package net.sf.odinms.tools;

import java.awt.Point;
import java.awt.Rectangle;
import java.net.InetAddress;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.Map.Entry;
import java.util.Date;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;

import net.sf.odinms.client.BuddylistEntry;
import net.sf.odinms.client.Equip;
import net.sf.odinms.client.GameConstants;
import net.sf.odinms.client.IEquip;
import net.sf.odinms.client.IItem;
import net.sf.odinms.client.ISkill;
import net.sf.odinms.client.Item;
import net.sf.odinms.client.MapleBuffStat;
import net.sf.odinms.client.MapleCharacter;
import net.sf.odinms.client.MapleCharacter.SkillEntry;
import net.sf.odinms.client.MapleClient;
import net.sf.odinms.client.MapleInventory;
import net.sf.odinms.client.MapleInventoryType;
import net.sf.odinms.client.MapleKeyBinding;
import net.sf.odinms.client.MaplePet;
import net.sf.odinms.client.MapleQuestStatus;
import net.sf.odinms.client.MapleStat;
import net.sf.odinms.client.IEquip.ScrollResult;
import net.sf.odinms.client.MapleDisease;
import net.sf.odinms.client.MapleJob;
import net.sf.odinms.client.MapleMount;
import net.sf.odinms.client.MapleRing;
import net.sf.odinms.client.SkillMacro;
import net.sf.odinms.client.status.MonsterStatus;
import net.sf.odinms.database.DatabaseConnection;
import net.sf.odinms.net.ByteArrayMaplePacket;
import net.sf.odinms.net.MaplePacket;
import net.sf.odinms.net.SendPacketOpcode;
import net.sf.odinms.net.channel.handler.SummonDamageHandler.SummonAttackEntry;
import net.sf.odinms.net.login.LoginServer;
import net.sf.odinms.net.world.MapleParty;
import net.sf.odinms.net.world.MaplePartyCharacter;
import net.sf.odinms.net.world.PartyOperation;
import net.sf.odinms.net.world.PlayerCoolDownValueHolder;
import net.sf.odinms.server.MapleItemInformationProvider;
import net.sf.odinms.server.playerinteractions.*;
import net.sf.odinms.server.MapleStatEffect;
import net.sf.odinms.server.MTSItemInfo;
import net.sf.odinms.server.playerinteractions.HiredMerchant;
import net.sf.odinms.server.playerinteractions.MaplePlayerShop;
import net.sf.odinms.server.life.MapleMonster;
import net.sf.odinms.server.life.MapleNPC;
import net.sf.odinms.server.maps.MapleMap;
import net.sf.odinms.server.maps.MapleReactor;
import net.sf.odinms.server.movement.LifeMovementFragment;
import net.sf.odinms.tools.data.output.LittleEndianWriter;
import net.sf.odinms.tools.data.output.MaplePacketLittleEndianWriter;
import net.sf.odinms.net.world.guild.*;
import net.sf.odinms.client.MapleCSInventory;
import net.sf.odinms.client.MapleCSInventoryItem;
import net.sf.odinms.client.skills.*;
import net.sf.odinms.net.LongValueHolder;
import net.sf.odinms.server.MapleDueyActions;
import net.sf.odinms.server.MapleShopItem;
import net.sf.odinms.server.MapleTrade;
import net.sf.odinms.server.constants.Items;
import net.sf.odinms.server.life.MobSkill;
import net.sf.odinms.server.maps.MapleMist;
import net.sf.odinms.server.maps.MapleSummon;
import net.sf.odinms.net.channel.handler.BeansGame1Handler.Beans;
import net.sf.odinms.client.副职业技能;

public class MaplePacketCreator {

    private static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(MaplePacketCreator.class);
    private final static byte[] CHAR_INFO_MAGIC = new byte[]{(byte) 0xff, (byte) 0xc9, (byte) 0x9a, 0x3b};
    public static final List<Pair<MapleStat, Integer>> EMPTY_STATUPDATE = Collections.emptyList();
    private final static long FINAL_TIME = 3439785600000L;
    private static boolean show = false;
    private static int sysTime = 获取当前时间();

    //登录界面
    public static MaplePacket getHello(short mapleVersion, byte[] sendIv, byte[] recvIv, boolean testServer) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(16);
        //0D 00 5D 00 00 00 6E 4C F3 0D 09 2D 55 7E 04
        mplew.writeShort(0x0D);  //0D是代表盛大版本的标志,其他服不一定是0D
        mplew.writeShort(mapleVersion);
        mplew.write(new byte[]{0, 0});
        mplew.write(recvIv);
        mplew.write(sendIv);
        mplew.write(testServer ? 5 : 4);
        return mplew.getPacket();
    }

    public static MaplePacket getHelloto() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SEND_LINK.getValue());//093修改
        String[] a = {"MapLogin", "MapLogin1", "MapLogin2", "MapLogin3", "MapLogin4", "MapLogin5", "MapLogin6", "MapLogin7", "MapLogin8", "MapLogin9"};
        mplew.writeMapleAsciiString(a[(int) (Math.random() * a.length)]);
        mplew.writeInt(sysTime); //当前系统时间的年月日时
        return mplew.getPacket();
    }

    public static int 获取当前时间() {
        String 当前时间 = new SimpleDateFormat("yyyy-MM-dd-HH").format(new Date()).replace("-", "");
        return Integer.valueOf(当前时间);
    }
    /**
     * 发送一个ping包
     *
     * @return The packet.
     */
    public static MaplePacket getPing() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(16);
        mplew.writeShort(SendPacketOpcode.PING.getValue());
        return mplew.getPacket();
    }

    // 获得一个登陆失败的包.
    public static MaplePacket getLoginFailed(int reason) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(16);

        mplew.writeShort(SendPacketOpcode.LOGIN_STATUS.getValue());
        mplew.writeInt(reason);
        mplew.writeShort(0);

        return mplew.getPacket();
    }

    public static MaplePacket getPermBan(byte reason) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // 00 00 02 00 01 01 01 01 01 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(16);

        mplew.writeShort(SendPacketOpcode.LOGIN_STATUS.getValue());
        mplew.writeShort(0x02); // 账号已经被禁止 is banned
        mplew.write(0x0);
        mplew.write(reason);
        mplew.write(HexTool.getByteArrayFromHexString("01 01 01 01 00"));

        return mplew.getPacket();
    }

    //临时封号的包
    public static MaplePacket getTempBan(long timestampTill, byte reason) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(17);

        mplew.writeShort(SendPacketOpcode.LOGIN_STATUS.getValue());
        mplew.write(0x02);
        mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00")); // Account is banned
        mplew.write(reason);
        mplew.writeLong(timestampTill); // Tempban date is handled as a 64-bit long, number of 100NS intervals since 1/1/1601. Lulz.

        return mplew.getPacket();
    }

    //得到了成功的身份证认证,并将请求包。 （这个是登陆的很重要啊!!!）
    public static MaplePacket getAuthSuccess(MapleClient c) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.LOGIN_STATUS.getValue());
        mplew.write(0);
        mplew.write(HexTool.getByteArrayFromHexString("36 FF 82 02"));
        mplew.write((byte) c.getGender());
        mplew.writeShort(0);
        mplew.writeMapleAsciiString(c.getAccountName()); //账号
        mplew.writeLong(0);
        mplew.write(HexTool.getByteArrayFromHexString("20 AE 68 6B CC CB 01 00"));
        mplew.writeLong(0);
        mplew.write(HexTool.getByteArrayFromHexString("4E 9E 97 20 96 B5 C0 96 00 00 00"));
        mplew.writeMapleAsciiString(String.valueOf(c.getAccID()));
        mplew.writeMapleAsciiString(c.getAccountName());//账号
        mplew.write(1); //0提示没填身份证

        return mplew.getPacket();
    }

    public static MaplePacket licenseRequest() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.LOGIN_STATUS.getValue());
        mplew.write((byte) 0x16);
        return mplew.getPacket();
    }

    public static MaplePacket licenseResult() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.LICENSE_RESULT.getValue());
        mplew.write(1);
        return mplew.getPacket();
    }

    //性别更换
    public static MaplePacket genderChanged(MapleClient c) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);

        mplew.writeShort(SendPacketOpcode.GENDER_SET.getValue());
        mplew.write(0);
        mplew.writeMapleAsciiString(c.getAccountName());
        mplew.writeMapleAsciiString(String.valueOf(c.getAccID()));

        return mplew.getPacket();
    }

    //性别选择
    public static MaplePacket genderNeeded(MapleClient c) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);

        mplew.writeShort(SendPacketOpcode.CHOOSE_GENDER.getValue());
        mplew.writeMapleAsciiString(c.getAccountName());

        return mplew.getPacket();
    }


    public static MaplePacket pinOperation(byte mode) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);

        mplew.writeShort(SendPacketOpcode.PIN_OPERATION.getValue());
        mplew.write(mode);

        return mplew.getPacket();
    }

    public static MaplePacket pinAssigned() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);

        mplew.writeShort(SendPacketOpcode.PIN_ASSIGNED.getValue());
        mplew.write(0);

        return mplew.getPacket();
    }


     //服务器列表1
    public static MaplePacket getServerList(int serverId, String serverName, Map<Integer, Integer> channelLoad) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SERVERLIST.getValue());
        mplew.write(serverId);
        mplew.writeMapleAsciiString(serverName);
        mplew.write(LoginServer.getInstance().getFlag());
        mplew.writeMapleAsciiString(LoginServer.getInstance().getEventMessage());
        mplew.writeShort(0x64); // 093修改
        //mplew.write(0x0); // 093删除
        mplew.writeShort(0x64); // 093修改
        //mplew.write(0x0); // 093删除

        int lastChannel = 1;
        Set<Integer> channels = channelLoad.keySet();
        for (int i = 30; i > 0; i--) {
            if (channels.contains(i)) {
                lastChannel = i;
                break;
            }
        }
        mplew.write(lastChannel);
        mplew.writeInt(500);
        int load;
        for (int i = 1; i <= lastChannel; i++) {
            if (channels.contains(i)) {
                load = channelLoad.get(i);
            } else {
                load = 1200;
            }
            mplew.writeMapleAsciiString(serverName + "-" + i);
            mplew.writeInt(load);
            mplew.write(0);
            mplew.writeShort(i - 1);
        }
        mplew.writeInt(0);//093修改 原来为Short(0);
        mplew.write(new byte[3]);// 093新增
        return mplew.getPacket();
    }

    /**
     * 得到一个包说服务器列表就结束了。
     *
     * @return The end of server list packet.
     */
    public static MaplePacket getEndOfServerList() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SERVERLIST.getValue());
        mplew.write(0xFF);

        return mplew.getPacket();
    }

    /**
     *  得到了包服务器状态信息。
     *
     * Possible values for <code>status</code>:<br>
     * 0 - Normal<br>
     * 1 - Highly populated<br>
     * 2 - Full
     *
     * @param status The server status.
     * @return The server status packet.
     */
    public static MaplePacket getServerStatus(int status) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SERVERSTATUS.getValue());
        mplew.write(status);

        return mplew.getPacket();
    }

    //得到一个包告诉客户通道服务器的IP位址。
    public static MaplePacket getServerIP(InetAddress inetAddr, int port, int clientId) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SERVER_IP.getValue());
        mplew.writeShort(0);
        byte[] addr = inetAddr.getAddress();
        mplew.write(addr);
        mplew.writeShort(port);
        // 0x13 = numchannels?
        mplew.writeInt(clientId); // this gets repeated to the channel server
        // leos.write(new byte[] { (byte) 0x13, (byte) 0x37, 0x42, 1, 0, 0, 0, 0, 0 });
        mplew.write(new byte[]{1, 0, 0, 0, 0});


        return mplew.getPacket();
    }

    //更换频道
    //Received CHANGE_CHANNEL [0013] (9)
    //[13 00] [01] [DD] [E7 82] [6D] [89 21]
    //[13 00] [01] [CA] [66 36] [7D] [8A 21]
    //[13 00] [01] [CA] [66 36] [7E] [89 21]
    public static MaplePacket getChannelChange(InetAddress inetAddr, int port) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CHANGE_CHANNEL.getValue());
        mplew.write(1);
        byte[] addr = inetAddr.getAddress();
        mplew.write(addr);
        mplew.writeShort(port);
        mplew.write(0); //093新增
        return mplew.getPacket();
    }



    //获取角色列表 093
    public static MaplePacket getCharList(MapleClient c, int serverId) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CHARLIST.getValue());
        mplew.write(0);
        mplew.writeInt(0);
        List<MapleCharacter> chars = c.loadCharacters(serverId);
        mplew.write((byte) chars.size()); //目前角色个数
        for (MapleCharacter chr : chars) {
            addCharEntry(mplew, chr);//角色进入
            mplew.write(0);
        }
        mplew.writeShort(3);
        mplew.writeLong(LoginServer.getInstance().getMaxCharacters());//最大角色数
        mplew.writeInt(0);//093新增
        return mplew.getPacket();
    }


    //分配新职业的SP技能点1
    public static void addRemainingSp(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        if (show) {
            System.out.println("调用的函数：" + new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        }
        if (chr.isEvan() || chr.isResistance()) {
            specialSp(mplew, chr);
        } else {
            //普通职业技能点
            mplew.writeShort(chr.getRemainingSp()); //剩余SP
        }
    }


   //建立角色---
    private static void addCharStats(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeInt(chr.getId()); // 角色ID
        /*
        mplew.writeAsciiString(chr.getName());
        for (int x = chr.getName().getBytes().length; x < 13; x++) { // 名字填充到13位
            mplew.write(0);
        }
        */
        mplew.writeMapleNameString(chr.getName()); //自动填充到13位
        mplew.write(chr.getGender()); // 性别 (0 = 男, 1 = 女)
        mplew.write(chr.getSkinColor().getId()); // 皮肤
        mplew.writeInt(chr.getFace()); // 脸型
        mplew.writeInt(chr.getHair()); // 发型
        mplew.write(chr.getLevel()); // 等级
        mplew.writeShort(chr.getJob().getId()); // job
        mplew.writeShort(chr.getStr()); // str
        mplew.writeShort(chr.getDex()); // dex
        mplew.writeShort(chr.getInt()); // int
        mplew.writeShort(chr.getLuk()); // 运气
        mplew.writeInt(chr.getHp()); // 当前HP
        mplew.writeInt(chr.getMaxHp()); // 最大HP
        mplew.writeInt(chr.getMp()); // 当前MP
        mplew.writeInt(chr.getMaxMp()); //最大MP
        mplew.writeShort(chr.getRemainingAp()); // 剩余AP
        addRemainingSp(mplew, chr);
        mplew.writeInt(chr.getExp()); //当前经验
        mplew.writeInt(chr.getFame()); //人气 093修改 short -> int
        mplew.writeInt(0); //00
        mplew.writeLong(DateUtil.getFileTimestamp(System.currentTimeMillis()));//系统时间
        mplew.writeInt(chr.getMapId()); // 当前地图ID
        mplew.write(chr.getInitialSpawnpoint()); // spawnpoint
        mplew.writeShort(0);
        mplew.write(0); //093新增
        mplew.writeInt(sysTime); //年月日时
        //倾向系统 领袖气质 感性 洞察力 意志 手技 魅力
        //charisma, sense, insight, volition, hands, charm;
        mplew.writeInt(chr.getCharisma()); //领袖气质
        mplew.writeInt(chr.getSense()); //洞察力
        mplew.writeInt(chr.getInsight()); //意志
        mplew.writeInt(chr.getVolition()); //手技
        mplew.writeInt(chr.getHands()); //感性
        mplew.writeInt(chr.getCharm()); //魅力
        mplew.writeShort(chr.getTDS_charisma()); //今天的领袖气质
        mplew.writeShort(chr.getTDS_sense()); //今天的洞察力
        mplew.writeShort(chr.getTDS_insight()); //今天的意志
        mplew.writeShort(chr.getTDS_volition()); //今天的手技
        mplew.writeShort(chr.getTDS_hands()); //今天的感性
        mplew.writeShort(chr.getTDS_charm()); //今天的魅力
        mplew.writeInt(chr.getBattleExp()); //战斗经验值 x % (battleExp)
        mplew.write(chr.getPkLevel()); //PkLevel
        mplew.writeInt(chr.getBattlePoint()); //保有BP(battlePoint)
        mplew.write(5); //原来是0x05
    }

    // 角色外观 093
     private static void addCharLook(MaplePacketLittleEndianWriter mplew, MapleCharacter chr, boolean mega) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.write(chr.getGender());//性别
        mplew.write(chr.getSkinColor().getId()); //肤色
        mplew.writeInt(chr.getFace()); // 脸型
        mplew.writeShort(chr.getJob().getId());//093新增 jobid
        mplew.writeShort(0);
        mplew.write(mega ? 0 : 1);
        mplew.writeInt(chr.getHair()); //发型
        MapleInventory equip = chr.getInventory(MapleInventoryType.EQUIPPED);//工厂模式写的
        Map<Byte, Integer> myEquip = new LinkedHashMap<Byte, Integer>();
        Map<Byte, Integer> maskedEquip = new LinkedHashMap<Byte, Integer>();
        synchronized (equip) {
            for (IItem item : equip.list()) { //遍历装备列表
                byte pos = (byte) (item.getPosition() * -1);//定义装备的位置pos
                if (pos < 100 && myEquip.get(pos) == null) {
                    myEquip.put(pos, item.getItemId());
                } else if ((pos > 100/* || pos == -128*/) && pos != 111) {
                    pos -= 100;
                    if (myEquip.get(pos) != null) {
                        maskedEquip.put(pos, myEquip.get(pos));
                    }
                    myEquip.put(pos, item.getItemId());
                } else if (myEquip.get(pos) != null) {
                    maskedEquip.put(pos, item.getItemId());
                }
            }
            //非点装
            for (Entry<Byte, Integer> entry : myEquip.entrySet()) {
                mplew.write(entry.getKey());//装备栏的位置
                mplew.writeInt(entry.getValue());//装备ID
            }
            mplew.write(-1);
            //点装
            for (Entry<Byte, Integer> entry : maskedEquip.entrySet()) {
                mplew.write(entry.getKey());//pos
                mplew.writeInt(entry.getValue());//itemid
            }
            mplew.write(-1);

            IItem cWeapon = equip.getItem((byte) -111);
            //点装武器
            mplew.writeInt(cWeapon != null ? cWeapon.getItemId() : 0);
            //检测是否有宠物
            for(int i = 0; i < 3; i++)
            if (chr.getPet(i)!= null)
                mplew.writeInt(chr.getPet(i).getItemId());//宠物ID
            else
                mplew.writeInt(0);

        }
    }

    //背包的方法
    private static void addInventoryInfo(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.write(chr.getLinkedName() != null ? 1 : 0);
        if (chr.getLinkedName() != null) {
            mplew.writeMapleAsciiString(chr.getLinkedName());
        }
//        mplew.write(1);
//        mplew.writeMapleAsciiString(chr.getName()); //精灵的祝福关联的角色名
//        mplew.write(0); //精灵的祝福
//        mplew.write(0); //女皇的祝福
//        mplew.write(0);//新增
        mplew.writeShort(0);
        mplew.writeInt(chr.getMeso()); // 金币4位
        mplew.writeInt(chr.getId());
        mplew.writeInt(chr.getBeans()); //豆豆
        mplew.writeInt(chr.getCSPoints(1));//抵用卷
        mplew.write(chr.getInventory(MapleInventoryType.EQUIP).getSlots()); // 装备栏容量 游戏内为18个则封包数值为18
        mplew.write(chr.getInventory(MapleInventoryType.USE).getSlots()); // 消耗栏容量
        mplew.write(chr.getInventory(MapleInventoryType.SETUP).getSlots()); // 设置栏容量
        mplew.write(chr.getInventory(MapleInventoryType.ETC).getSlots()); // 其他栏容量
        mplew.write(chr.getInventory(MapleInventoryType.CASH).getSlots()); // 特殊栏容量 游戏内为18个则封包数值为30
        mplew.writeLong(DateUtil.getFileTimestamp(System.currentTimeMillis())); //系统时间
        //下面是关于装备的
        //mplew.write(HexTool.getByteArrayFromHexString("CA 00 00 00 83 5C 73 00 00 00 00 00 00 00 00 00 18 18 18 18 30 00 40 E0 FD 3B 37 4F 01"));
        MapleInventory iv = chr.getInventory(MapleInventoryType.EQUIPPED);
        Collection<IItem> equippedC = iv.list();
        List<Item> equipped = new ArrayList<Item>(equippedC.size());
        synchronized (iv) {
            for (IItem item : equippedC) {
                if (((Item) item).getPosition() > -100) { //非点装
                    equipped.add((Item) item);
                }
            }
        }
        Collections.sort(equipped);
        for (Item item : equipped) {
            addItemInfo(mplew, item);
        }
        mplew.writeShort(0); //身上的装备加载结束
        //---------------------------------
        //---------------------------------
        equipped.clear();
        synchronized (iv) {
            for (IItem item : equippedC) {
                if (((Item) item).getPosition() < -100 && ((Item) item).getPosition() > -1000) { //点装
                    equipped.add((Item) item);
                }
            }
        }
        Collections.sort(equipped);
        for (Item item : equipped) {
            addItemInfo(mplew, item);
        }
        mplew.writeShort(0); //身上的点装加载结束
        //---------------------------------
        //---------------------------------
        iv = chr.getInventory(MapleInventoryType.EQUIP);
        synchronized (iv) {
            for (IItem item : iv.list()) {
                addItemInfo(mplew, item);
            }
        }
        mplew.writeShort(0); //装备栏加载结束
        //---------------------------------
        //pos(-1100, -1000] 龙神装备范围
        //---------------------------------
        if(chr.isEvan()){ //是龙神才加载
            iv = chr.getInventory(MapleInventoryType.EQUIPPED);
            synchronized (iv) {
                for (IItem item : iv.list()) {
                    if(((Item) item).getPosition() > -1100 && ((Item) item).getPosition() <= -1000) {
                        addItemInfo(mplew, item);
                        //System.out.println("加载龙神装备"+item.getItemId());
                    }
                }
            }
        }
        mplew.writeShort(0); //龙神装备加载结束
        //---------------------------------
        //pos(-1200, -1100] 机械师装备范围
        //---------------------------------
        if(chr.isMechinic()) { //是机械师才加载
            iv = chr.getInventory(MapleInventoryType.EQUIPPED);
            synchronized (iv) {
                for (IItem item : iv.list()) {
                    if(((Item) item).getPosition() > -1200 && ((Item) item).getPosition() <= -1100) {
                        addItemInfo(mplew, item);
                        //System.out.println("加载机械师装备"+item.getItemId());
                    }
                }
            }
        }
        mplew.writeShort(0); //机械师装备加载结束
        //---------------------------------
        //pos(-1300, -1200] 安卓装备范围
        //---------------------------------
        iv = chr.getInventory(MapleInventoryType.EQUIPPED);
        synchronized (iv) {
            for (IItem item : iv.list()) {
                if(((Item) item).getPosition() > -1300 && ((Item) item).getPosition() <= -1200) {
                    addItemInfo(mplew, item);
                    //System.out.println("加载安卓cash装备"+item.getItemId());
                }
            }
        }
        mplew.writeShort(0); //智能机器人装备加载结束
        //---------------------------------
        //---------------------------------
        iv = chr.getInventory(MapleInventoryType.USE);
        synchronized (iv) {
            for (IItem item : iv.list()) {
                addItemInfo(mplew, item);
            }
        }
        mplew.write(0); //消耗栏加载结束
        //---------------------------------
        //---------------------------------
        iv = chr.getInventory(MapleInventoryType.SETUP);
        synchronized (iv) {
            for (IItem item : iv.list()) {
                addItemInfo(mplew, item);
            }
        }
        mplew.write(0); //设置栏加载结束
        //---------------------------------
        //---------------------------------
        iv = chr.getInventory(MapleInventoryType.ETC);
        synchronized (iv) {
            for (IItem item : iv.list()) {
                addItemInfo(mplew, item);
            }
        }
        mplew.write(0); //其他栏加载结束
        //---------------------------------
        //---------------------------------
        iv = chr.getInventory(MapleInventoryType.CASH);
        synchronized (iv) {
            for (IItem item : iv.list()) {
                addItemInfo(mplew, item);
            }
        }
        mplew.write(0); //现金栏加载结束
        //---------------------------------
        //---------------------------------
        mplew.writeInt(-1);//新增
    }

    //技能生成
    private static void addSkillRecord(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        Map<ISkill, MapleCharacter.SkillEntry> skills = chr.getSkills();
        int x =0;
           for (Entry<ISkill, MapleCharacter.SkillEntry> skill : skills.entrySet()) { //遍历输出技能
               int id = skill.getKey().getId();
               if(id == 32001008 || id == 32001009 || id == 32001010 ||  id == 32001011){
                   x +=1;
           }
        }
        x = skills.size() - x;
        mplew.writeShort(x + 2);//角色技能个数

        for (Entry<ISkill, MapleCharacter.SkillEntry> skill : skills.entrySet()) { //遍历输出技能
            int skillid = skill.getKey().getId();
            if(skillid == 32001008 || skillid == 32001009 || skillid == 32001010 ||  skillid == 32001011){
                continue;
            } else {
                mplew.writeInt(skillid);//技能ID
                mplew.writeInt(skill.getValue().skillevel);//技能等级
                mplew.write(HexTool.getByteArrayFromHexString("00 80 05 BB 46 E6 17 02"));

                /*
                //双刀的技能不一样。
                if (skillid == 4311003 || skillid == 4321000 || skillid == 4331001 || skillid == 4331002 || skillid == 4331005 || skillid == 4341000 || skillid == 4340001 || skillid == 4341002 || skillid == 4341003 || skillid == 4341004 || skillid == 4341005 || skillid == 4341006 || skillid == 4341007 || skillid == 4341008) {
                    mplew.writeInt(skill.getValue().masterlevel);
                } else if (skillid == 22171000 || skillid == 22170001 || skillid == 22171002 || skillid == 22171003 || skillid == 22171004 || skillid == 22181000 || skillid == 22181001 || skillid == 22181002 || skillid == 22181003) {
                    mplew.writeInt(skill.getValue().masterlevel);
                } else if (skill.getKey().isFourthJob() && !chr.isEvan() && skillid != 4321002 && skillid != 4321003 && skillid != 1120012 && skillid != 1220013 && skillid != 2320010 && skillid != 2120009 && skillid != 2220009 && skillid != 2320010 && skillid != 3120011 && skillid != 3220009 && skillid != 4120010 && skillid != 4220009 && skillid != 5120011 && skillid != 5220012) {//冒险家的新技能
                    mplew.writeInt(skill.getValue().masterlevel);
                }
                */
                if (skill.getKey().isFourthJob() || skill.getKey().isDualFourthJob() || skill.getKey().isEvanFourthJob() || skill.getKey().isBigBangFourthJob()) {
                    mplew.writeInt(skill.getValue().masterlevel);
                }
            }
        }
        mplew.write(HexTool.getByteArrayFromHexString("10 F6 7B 05 84 02 00 08 00 80 05 BB 46 E6 17 02"));
        mplew.write(HexTool.getByteArrayFromHexString("30 44 7C 05 84 02 00 08 00 80 05 BB 46 E6 17 02"));
        mplew.writeShort(chr.getAllCooldowns().size());//冷却时间
        for (PlayerCoolDownValueHolder cooling : chr.getAllCooldowns()) {
            mplew.writeInt(cooling.skillId);
            int timeLeft = (int) (cooling.length + cooling.startTime - System.currentTimeMillis());
            mplew.writeShort(timeLeft / 1000);
        }
        //log.error("技能封包:"+mplew.getPacket());
    }

    private static void addCharEntry(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        addCharStats(mplew, chr); //角色状态
        addCharLook(mplew, chr, false); //角色外观
    }

    //任务信息
    private static void addQuestRecord(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        List<MapleQuestStatus> started = chr.getStartedQuests();
        //以下是任务
        mplew.writeShort(started.size());
        //log.info("任务长度:"+started.size());
        for (MapleQuestStatus q : started) {   //检测是否接过任务
            mplew.writeShort(q.getQuest().getId()); //任务ID
            String killStr = "";
            for (int kills : q.getMobKills().values()) {  //检测是否使用需要打怪的
                killStr += StringUtil.getLeftPaddedStr(String.valueOf(kills), '0', 3);
            }
            mplew.writeMapleAsciiString(killStr);
        }
        List<MapleQuestStatus> completed = chr.getCompletedQuests();
        mplew.writeShort(completed.size());  //完成了多少
        for (MapleQuestStatus q : completed) { //检测是否完成了任务
            mplew.writeInt(q.getQuest().getId());//093 Short --> Int
            mplew.writeLong(DateUtil.getFileTimestamp(q.getCompletionTime())); //8位 即取封包内40 D5 C2 43 95 90 CB 01
        }

    }

    //戒指信息?
    private static void addRingInfo(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MapleInventory iv = chr.getInventory(MapleInventoryType.EQUIPPED);
        Collection<IItem> equippedC = iv.list();
        List<IEquip> 恋人戒指 = new ArrayList<IEquip>();
        List<IEquip> 友谊戒指 = new ArrayList<IEquip>();
        boolean 结婚戒指 = false;
        for (IItem item : equippedC) {
            if (item.友谊戒指()) {
                友谊戒指.add(MapleRing.loadFromDb(item.getItemId(), item.getPosition(), item.getUniqueId()));
            } else if(item.恋人戒指()){
                恋人戒指.add(MapleRing.loadFromDb(item.getItemId(), item.getPosition(), item.getUniqueId()));
            } else if(item.结婚戒指()){
                结婚戒指 = true;
            }
        }
        iv = chr.getInventory(MapleInventoryType.EQUIP);
        for (IItem item : iv.list()) {
            if (item.友谊戒指()) {
                友谊戒指.add(MapleRing.loadFromDb(item.getItemId(), item.getPosition(), item.getUniqueId()));
            } else if(item.恋人戒指()){
                恋人戒指.add(MapleRing.loadFromDb(item.getItemId(), item.getPosition(), item.getUniqueId()));
            } else if(item.结婚戒指()){
                结婚戒指 = true;
            }
        }
        mplew.writeShort(0);//迷你小游戏 翻牌 五子棋
        mplew.writeShort(恋人戒指.size());
        for (IEquip ring : 恋人戒指) {
            mplew.writeInt(ring.getPartnerId()); //37 3A 0A 00
            mplew.writeMapleNameString(ring.getPartnerName()); //对方的名字 且自动填充到13位 C2 B7 B7 C9 D7 A5 B0 FC CA AE BA C5 00
            mplew.writeInt(ring.getUniqueId()); //B6 22 49 00
            mplew.writeInt(0);
            mplew.writeInt(ring.getPartnerUniqueId()); //B7 22 49 00
            mplew.writeInt(0);
        }
        mplew.writeShort(友谊戒指.size());
        for (IEquip ring : 友谊戒指) {
            mplew.writeInt(ring.getPartnerId()); //37 3A 0A 00
            mplew.writeMapleNameString(ring.getPartnerName()); //对方的名字 且自动填充到13位 C2 B7 B7 C9 D7 A5 B0 FC CA AE BA C5 00
            mplew.writeInt(ring.getUniqueId()); //D4 26 49 00
            mplew.writeInt(0);
            mplew.writeInt(ring.getPartnerUniqueId()); //D4 26 49 00
            mplew.writeInt(0);
            mplew.writeInt(ring.getItemId());//E0 FA 10 00 四叶草
        }
        if(结婚戒指 && chr.isMarried()){
            mplew.writeShort(1);
            mplew.writeInt(chr.getPartnerId());
            mplew.writeMapleNameString(chr.getPartnerName()); //对方的名字 且自动填充到13位 C2 B7 B7 C9 D7 A5 B0 FC CA AE BA C5 00
            mplew.writeInt(chr.getId()); //7C 40 0A 00
            mplew.writeInt(chr.getPartnerId()); //配偶cid 37 3A 0A 00
        } else {
            mplew.writeShort(0);
        }
    }

    private static void addTeleportRockRecord(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        List<Integer> maps = chr.getTRockMaps(0);
        for (int map : maps) {
            mplew.writeInt(map);
        }
        for (int i = maps.size(); i < 5; i++) {
            mplew.write(CHAR_INFO_MAGIC);
        }
        maps = chr.getTRockMaps(1);
        for (int map : maps) {
            mplew.writeInt(map);
        }
        for (int i = maps.size(); i < 23; i++) {
            mplew.write(CHAR_INFO_MAGIC);
        }
        mplew.writeShort(chr.area_data.size());
        for (int i = 0; i < chr.area_data.size(); i++) {
            mplew.writeShort(i);
            mplew.writeMapleAsciiString(chr.area_data.get(i));
        }
    }

    /**
     * 得到人物信息,为一个角色。
     *
     * @param chr The character to get info about.
     * @return The character info packet.
     */
    public static MaplePacket getCharInfo(MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.WARP_TO_MAP.getValue());
        mplew.write(HexTool.getByteArrayFromHexString(""
                + "01 00 01 00 "
                + "00 00 01 00 "
                + "00 00"));
        mplew.writeInt(chr.getClient().getChannel() - 1);
        mplew.write(HexTool.getByteArrayFromHexString(""
                + "00 00 00 00 "
                + "00 01 00 00 "
                + "00 00 01 00 "
                + "00")); //新增Int
        for (int i = 0; i < 3; i++) {
            mplew.writeInt(Randomizer.nextInt());
        }
        mplew.writeLong(-1);
        mplew.writeShort(0);
        mplew.write(new byte[5]);// 093增加
        addCharStats(mplew, chr);//人物信息
        mplew.write(chr.getBuddylist().getCapacity());
        addInventoryInfo(mplew, chr);//装备
        mplew.write(new byte[5]);//093新增
        addSkillRecord(mplew, chr);//技能
        addQuestRecord(mplew, chr);//任务
        addRingInfo(mplew, chr); //戒指
        addTeleportRockRecord(mplew, chr);
        /*
         * 弩骑多加
         * 32 (1个字节)
         * //26个0
         * 00 00 00 00
         * 00 00 00 00
         * 00 00 00 00
         * 00 00 00 00
         * 00 00 00 00
         *
         * v092
         * 05 00 //size
         * 7A 1F 47 00 E4 59 00 00 00 0A 00 B8 0B 90 C6 26 82 D4 08 CC 01 FF FF FF FF 00 40 E0 FD 3B 37 4F 01
         * 7A 1F 47 00 3D 5A 00 00 00 0A 00 E4 0C D0 6F FC AE D4 08 CC 01 FF FF FF FF 00 40 E0 FD 3B 37 4F 01
         * 7A 1F 47 00 F0 59 00 00 00 1E 00 E4 0C 10 0C 5E 30 E3 08 CC 01 FF FF FF FF 00 40 E0 FD 3B 37 4F 01
         * 7A 1F 47 00 FA 59 00 00 00 48 00 EE 0C F0 67 8E A6 BB 0C CC 01 FF FF FF FF 00 40 E0 FD 3B 37 4F 01
         * 7A 1F 47 00 0A 5A 00 00 00 7B 00 EF 0C 50 76 3A 34 0F 11 CC 01 FF FF FF FF 00 40 E0 FD 3B 37 4F 01
         *
         * v093
         * 05 00 //size
         * 7A 1F 47 00 E4 59 00 00 00 0A 00 B8 0B 90 C6 26 82 D4 08 CC 01 FF FF FF FF 00 40 E0 FD 3B 37 4F 01 00 00 00 00
         * 7A 1F 47 00 3D 5A 00 00 00 0A 00 E4 0C D0 6F FC AE D4 08 CC 01 FF FF FF FF 00 40 E0 FD 3B 37 4F 01 00 00 00 00
         * 7A 1F 47 00 F0 59 00 00 00 1E 00 E4 0C 10 0C 5E 30 E3 08 CC 01 FF FF FF FF 00 40 E0 FD 3B 37 4F 01 00 00 00 00
         * 7A 1F 47 00 FA 59 00 00 00 48 00 EE 0C F0 67 8E A6 BB 0C CC 01 FF FF FF FF 00 40 E0 FD 3B 37 4F 01 00 00 00 00
         * 7A 1F 47 00 0A 5A 00 00 00 7B 00 EF 0C 50 76 3A 34 0F 11 CC 01 FF FF FF FF 00 40 E0 FD 3B 37 4F 01 00 00 00 00
         *
         */
        if (chr.getJob().getId() / 100 == 33) {
            mplew.write(50);
            mplew.write(new byte[20]);
        }
        mplew.write(new byte[24]);
        mplew.writeLong(DateUtil.getFileTimestamp(System.currentTimeMillis()));
        mplew.writeInt(0x64);
        mplew.writeShort(0x100);
        //log.error("进入游戏封包:"+mplew.getPacket());
        return mplew.getPacket();
    }



    /*
    private static void addMonsterBookInfo(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        mplew.writeShort(chr.ares_data.size());
        for (int i = 0; i < chr.ares_data.size(); i++) {
            mplew.writeShort(chr.ares_data_infoid.get(i));
            mplew.writeMapleAsciiString(chr.ares_data.get(i));
        }
        mplew.write(new byte[7]);
        mplew.writeInt(chr.getMonsterBookCover()); // cover
        mplew.write(0);
        Map<Integer, Integer> cards = chr.getMonsterBook().getCards();
        mplew.writeShort(cards.size());
        for (Entry<Integer, Integer> all : cards.entrySet()) {
            mplew.writeShort(all.getKey() % 10000); // Id
            mplew.write(all.getValue()); // Level
        }
    }
    */
    /**
     * 得到一个空的状态更新
     *
     * @return The empy stat update packet.
     */
    public static MaplePacket enableActions() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        return updatePlayerStats(EMPTY_STATUPDATE, true);
    }


    public static MaplePacket updateSpecialSP(MapleCharacter chr) {
        if (show) {
            System.out.println("调用的函数：" + new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        }
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.UPDATE_STATS.getValue());
        mplew.write(0);
        mplew.writeInt(MapleStat.AVAILABLESP.getValue());
        specialSp(mplew, chr);
        mplew.writeShort(0);
        return mplew.getPacket();
    }

    public static void specialSp(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        if (show) {
            System.out.println("调用的函数：" + new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        }
        Map<Integer, Integer> sp = chr.getEvanSp();
        if (!chr.isEvan()) {
            sp = chr.getResistanceSp();
        }
        int size = sp.size();
        for (int a : sp.values()) {
            if (a == 0) {
                size--;
            }
        }
        mplew.write(size);
        int keyV = 0;
        for (Entry<Integer, Integer> a : sp.entrySet()) {
            keyV = a.getValue(); //每转的Sp数
            if (keyV != 0) {
                mplew.write(a.getKey()); //转数
                mplew.write(keyV);
            }
        }
    }

    /**
     * 获取更新为指定的属性。
     *
     * @param stats The stats to update.
     * @return The stat update packet.
     */
    public static MaplePacket updatePlayerStats(List<Pair<MapleStat, Integer>> stats) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        return updatePlayerStats(stats, false);
    }


   public static MaplePacket updatePlayerStats(List<Pair<MapleStat, Integer>> stats, boolean itemReaction) {
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.UPDATE_STATS.getValue());
        if (itemReaction) { //如果是使用物品更新角色
            mplew.write(1);
        } else {
            mplew.write(0);
        }
        int updateMask = 0;
        for (Pair<MapleStat, Integer> statupdate : stats) {
            updateMask |= statupdate.getLeft().getValue();
        }
        List<Pair<MapleStat, Integer>> mystats = stats;
        if (mystats.size() > 1) {
            Collections.sort(mystats, new Comparator<Pair<MapleStat, Integer>>() {
                @Override
                public int compare(Pair<MapleStat, Integer> o1, Pair<MapleStat, Integer> o2) {
                    int val1 = o1.getLeft().getValue();
                    int val2 = o2.getLeft().getValue();
                    return (val1 < val2 ? -1 : (val1 == val2 ? 0 : 1));
                }
            });
        }
        mplew.writeInt(updateMask);
        for (Pair<MapleStat, Integer> statupdate : mystats) {
            if (statupdate.getLeft().getValue() >= 1) {
                if(statupdate.getLeft().getValue() == MapleStat.SKIN.getValue()) {
                    mplew.writeShort(statupdate.getRight().shortValue());
                } else if(statupdate.getLeft().getValue() == MapleStat.LEVEL.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.Pk等级.getValue()) {
                    mplew.write(statupdate.getRight().shortValue());
                } else if(statupdate.getLeft().getValue() == MapleStat.JOB.getValue()) {
                    mplew.writeShort(statupdate.getRight().shortValue());
                } else if(statupdate.getLeft().getValue() == MapleStat.FACE.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.HAIR.getValue()
                        ) {
                    mplew.writeInt(statupdate.getRight().intValue());
                } else if(statupdate.getLeft().getValue() == MapleStat.STR.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.DEX.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.INT.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.LUK.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.AVAILABLEAP.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.AVAILABLESP.getValue()
                        ) {
                    mplew.writeShort(statupdate.getRight().shortValue());
                } else if(statupdate.getLeft().getValue() == MapleStat.HP.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.MAXHP.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.MP.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.MAXMP.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.MESO.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.EXP.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.FAME.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.领袖气质.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.洞察力.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.意志.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.手技.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.感性.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.魅力.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.战斗经验值.getValue()
                        || statupdate.getLeft().getValue() == MapleStat.保有BP.getValue()
                        ) {
                    mplew.writeInt(statupdate.getRight().intValue());
                } else { //更新宠物.经验.兵法书和宠物
                    mplew.writeInt(statupdate.getRight().intValue());//091ok
                }
            }
        }
         mplew.writeShort(0);//更新捡取道具
         return mplew.getPacket();
    }

    //传送到地图即切换地图
    public static MaplePacket getWarpToMap(int to, int spawnPoint, MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
/*
90 00
01 00 01 00 00 00 01 00 00 00 //变化
04 00 00 00 //channel

00 00 00 00
00 05 00 00 //这个5不知道是什么 没分析
00 00 00 00
00 00 //变化

8A 7F 3D 36 //mapid
0B //portal
DC 11 00 00 //Hp
F0 BB C8 68 0B 08 CC 01 //time
64 00 00 00 //新增 int 64
 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.WARP_TO_MAP.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("01 00 01 00 00 00 01 00 00 00"));
        mplew.writeInt(chr.getClient().getChannel() - 1);

        mplew.writeInt(0);
        mplew.writeInt(0);
        mplew.writeInt(0);
        mplew.writeShort(0);

        mplew.writeInt(to); //传送的地图ID
        mplew.write(spawnPoint);
        mplew.writeInt(chr.getHp());
        mplew.writeLong(DateUtil.getFileTimestamp(System.currentTimeMillis()));
        mplew.writeInt(0x64);
        mplew.write(0);//093新增
        mplew.write(1);//093新增

         return mplew.getPacket();
    }


     //召唤门
    public static MaplePacket spawnPortal(int townId, int targetId, Point pos) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SPAWN_PORTAL.getValue());
        mplew.writeInt(townId);
        mplew.writeInt(targetId);
        mplew.writeInt(2311002);
        if (pos != null) {
            mplew.writeShort(pos.x);
            mplew.writeShort(pos.y);
        }

        return mplew.getPacket();
    }

    public static MaplePacket spawnDoor(int oid, Point pos, boolean town) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // [D3 00] [01] [93 AC 00 00] [6B 05] [37 03]
        //
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SPAWN_DOOR.getValue());
        mplew.write(town ? 1 : 0);
        mplew.writeInt(oid);
        mplew.writeShort(pos.x);
        mplew.writeShort(pos.y);

        return mplew.getPacket();
    }


    public static MaplePacket removeDoor(int oid, boolean town) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if (town) {
            mplew.writeShort(SendPacketOpcode.SPAWN_PORTAL.getValue());
            mplew.writeInt(999999999);
            mplew.writeInt(999999999);
        } else {
            mplew.writeShort(SendPacketOpcode.REMOVE_DOOR.getValue());
            mplew.write(/*town ? 1 : */0);
            mplew.writeInt(oid);
        }

        return mplew.getPacket();
    }

    //召唤召唤兽
    public static MaplePacket spawnSpecialMapObject(MapleSummon summon, int skillLevel, boolean animated) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*
         * 20 01
         * 5F 00 1F 00 //cid
         * A5 41 01 00 //objid
         * 5D 78 2F 00 //skillid
         * 8E //player level
         * 0F //skill level
         * 8E FF //x
         * 8B 00 //y
         * 04
         * 08
         * 00
         * 04 //召唤兽类型 summon.getMovementType().getValue()
         * 01 //召唤兽状态 status
         * 01 //召唤兽是不是活的 地雷 活
         * 00 //技能是不是傀儡召唤技能
         */
        /*
傀儡召唤
20 01
DF 8A 4D 00
80 0B 18 00
0E 3D 42 00
95
01
2A 00
5E FE

04
11
00

00
00
01
01

00
00
89 4E 00 00
00
E2 81 00 00
01 DF 4D 0F 00 02 73 71 0F 00
03 60 98 0F 00 04 7F BF 0F 00
05 CD E6 0F 00 06 A6 34 10 00
07 3D 5C 10 00 08 32 83 10 00
09 80 D1 10 00 0A 38 7A 14 00
0B 54 53 14 00 0C 55 F9 10 00
11 40 1F 11 00 12 B0 05 1D 00
13 C0 2C 1D 00 1A 24 6E 11 00
1D 3A 46 11 00 1E 36 94 11 00
FF
01 75 4B 0F 00 02 DF 71 0F 00
03 5F 98 0F 00 04 50 BF 0F 00
05 EE DE 0F 00 06 0A 2D 10 00
07 2B 5C 10 00 08 86 83 10 00
09 7E D1 10 00 FF 85 F9 19 00

00 00 00 00
00 00 00 00
00 00 00 00
         */
        mplew.writeShort(SendPacketOpcode.SPAWN_SPECIAL_MAPOBJECT.getValue());
        mplew.writeInt(summon.getOwner().getId());
        mplew.writeInt(summon.getObjectId());
        mplew.writeInt(summon.getSkill());
        mplew.write(summon.getOwner().getLevel()); //人物等级
        //mplew.write(summon.getSkill() == 35121011 ? 1 : skillLevel);
        mplew.write(summon.getSkill() == 35121011 ? 1 : skillLevel);
        mplew.writeShort(summon.getPosition().x);
        mplew.writeShort(summon.getPosition().y);
        mplew.write(4);
        mplew.write(0); //这个值也是每个召唤兽都不同 需要在summon类设置个变量储存
        mplew.write(0);
        mplew.write(summon.getMovementType().getValue());
        mplew.write(summon.getStatus());
        mplew.write(animated ? 1 : 0); //是否活的
        mplew.write(summon.isPuppet() ? 1 : 0);
        if (summon.isRobot()) { //磁场
            System.out.println("召唤兽是磁场");
            mplew.write(0);
        }
        if (summon.isPuppet()) { //傀儡召唤
            addCharLook2(mplew, summon.getOwner(), false);
        }
        //System.out.println("召唤兽封包"+mplew.getPacket());
        return mplew.getPacket();
    }

    public static void addCharLook2(MaplePacketLittleEndianWriter mplew, MapleCharacter chr, boolean mega) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.write(chr.getGender());
        mplew.write(chr.getSkinColor().getId());
        mplew.writeInt(chr.getFace());
        mplew.write(0);
        mplew.writeInt(chr.getHair());
        addCharEquips(mplew, chr.getInventory(MapleInventoryType.EQUIPPED), chr);
        mplew.writeInt(0);
        mplew.writeInt(0);
        mplew.writeInt(0);
    }

    public static void addCharEquips(MaplePacketLittleEndianWriter mplew, MapleInventory equip, MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        Map<Byte, Integer> myEquip = new LinkedHashMap<Byte, Integer>();
        Map<Byte, Integer> maskedEquip = new LinkedHashMap<Byte, Integer>();
        synchronized (equip) {
            for (IItem item : equip.list()) {
                byte pos = (byte) (item.getPosition() * -1);
                if (pos < 100 && myEquip.get(pos) == null) {
                    //System.out.println("1：" + pos);
                    myEquip.put(pos, item.getItemId());
                } else if ((pos > 100/* || pos == -128*/) && pos != 111) {
                    pos -= 100;
                    if (myEquip.get(pos) != null) {
                        //System.out.println("2：" + pos);
                        maskedEquip.put(pos, myEquip.get(pos));
                    }
                    //System.out.println("3：" + pos);
                    myEquip.put(pos, item.getItemId());
                } else if (myEquip.get(pos) != null) {
                    //System.out.println("4：" + pos);
                    maskedEquip.put(pos, item.getItemId());
                }
            }
            for (Entry<Byte, Integer> entry : myEquip.entrySet()) { //装备
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF);
            for (Entry<Byte, Integer> entry : maskedEquip.entrySet()) { //饰品
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF);
            IItem cWeapon = equip.getItem((byte) -111);
            mplew.writeInt(cWeapon != null ? cWeapon.getItemId() : 0);
        }
    }

    /**
     * Gets a packet to remove a special map object.
     *
     * @param summon
     * @param animated Animated removal?
     * @return The packet removing the object.
     */
    public static MaplePacket removeSpecialMapObject(MapleSummon summon, boolean animated) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // [86 00] [6A 4D 27 00] 33 1F 00 00 02
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.REMOVE_SPECIAL_MAPOBJECT.getValue());
        mplew.writeInt(summon.getOwner().getId());
        mplew.writeInt(summon.getObjectId());
        mplew.write(animated ? summon.getRemoveStatus() : 1);
        return mplew.getPacket();
    }

    //生成身上的装备方法
    protected static void addItemInfo(MaplePacketLittleEndianWriter mplew, IItem item) {
        addItemInfo(mplew, item, false, false , false);
    }

    protected static void addItemInfo(MaplePacketLittleEndianWriter mplew, IItem item, boolean zeroPosition, boolean leaveOut,boolean AddFormDorp) {
        addItemInfo(mplew, item, zeroPosition, leaveOut, false ,AddFormDorp);
    }

    private static void addItemInfo(MaplePacketLittleEndianWriter mplew, IItem item, boolean zeroPosition, boolean leaveOut, boolean cs , boolean AddFormDorp) {
        if (item.getUniqueId() > 0) {
            if (item.getItemId() >= 5000000 && item.getItemId() <= 5000100) { //褐色小猫
                addPetItemInfo(mplew, item, zeroPosition, leaveOut, cs);//宠物装备
            } else if (item.友谊戒指() || item.恋人戒指()) {
                addRingItemInfo(mplew, item, zeroPosition, leaveOut, cs);//戒指装备
            } else {
                addCashItemInfo(mplew, item, zeroPosition, leaveOut, cs);//点装
            }
        } else {
            if(MapleItemInformationProvider.getInstance().isCash(item.getItemId())) //093新增 由于物品也需要
                addCashItemInfo(mplew, item, zeroPosition, leaveOut, true);//点装
            else
                addNormalItemInfo(mplew, item, zeroPosition, leaveOut, false , AddFormDorp);//普通装备
        }
    }


   //普通物品的生成
    private static void addNormalItemInfo(MaplePacketLittleEndianWriter mplew, IItem item, boolean zeroPosition, boolean leaveOut, boolean cs , boolean AddFormDorp) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //System.out.println("加载普通装备"+item.getItemId());
        MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
        IEquip equip = null;
        boolean masking = false;
        boolean equipped = false;
        if (item.getType() == IItem.EQUIP) {
            equip = (IEquip) item;
        }
        short pos = item.getPosition();
        if (zeroPosition) {  //判断是否是起始位置
            if (!leaveOut) {
                mplew.write(0);
            }
        } else if (pos <= (short) -1) {
            pos *= -1;
            if (pos > 100 && pos < 1000) {
                masking = true;
                mplew.write(pos - 100);
            } else {
                mplew.write(pos);
            }
            equipped = true;
        } else {
            mplew.write(item.getPosition());  //装备部位
        }
         if(item.getType() == IItem.EQUIP && !AddFormDorp) {
             if(pos >= 1000 && pos < 1100) { //龙神
                 mplew.write(3);
                 //System.out.println("加载龙神装备"+item.getItemId());
             } else if(pos >= 1100 && pos < 1200) { //机械师
                 mplew.write(4);
                 //System.out.println("加载机械师装备"+item.getItemId());
             } else { //普通装备
                 mplew.write(0);//生成装备列表时出现这个 但拣装备时不出现
             }
             //安卓装备在cashitem加载
         }
        mplew.write(item.getType());  //装备类型?
        mplew.writeInt(item.getItemId());  //装备ID?
        mplew.write((ii.isCash(item.getItemId())) || cs ? 1 : 0);// 如果不是点券道具则继续 只返回0和1
        /*
        if (ii.isCash(item.getItemId()) || cs) {
            mplew.writeLong(-1);
        }
        */
        mplew.writeLong(DateUtil.getFileTimestamp(item.getExpiration() == null ? FINAL_TIME : item.getExpiration().getTime()));
        //System.out.println("物品时间："+item.getExpiration());
        mplew.writeInt(-1);//新增
        //如果是装备的话
        if (item.getType() == IItem.EQUIP) {
            mplew.write(equip.getUpgradeSlots()); //可升级次数
            mplew.write(equip.getLevel()); //已升级次数

            mplew.writeShort(equip.getStr()); // 力量
            mplew.writeShort(equip.getDex()); // 敏捷
            mplew.writeShort(equip.getInt()); // 智力
            mplew.writeShort(equip.getLuk()); // 运气

            mplew.writeShort(equip.getHp()); // hp
            mplew.writeShort(equip.getMp()); // mp

            mplew.writeShort(equip.getWatk()); // 物理攻击
            mplew.writeShort(equip.getMatk()); // 魔法攻击
            mplew.writeShort(equip.getWdef()); // 物理防御
            mplew.writeShort(equip.getMdef()); // 魔法防御

            mplew.writeShort(equip.getAcc()); // 命中率
            mplew.writeShort(equip.getAvoid()); // 回避率
            mplew.writeShort(equip.getHands()); // 手技
            mplew.writeShort(equip.getSpeed()); // 移动速度
            mplew.writeShort(equip.getJump()); // 跳跃力

            mplew.writeMapleAsciiString(equip.getOwner()); //拥有者名字 没名字发 short 0
            short value =  (short) (equip.getLocked() | equip.getFlag());
            mplew.writeShort(value);
            mplew.write(equip.getItemSkill());//是否获得道具附加技能 0 不获得 1 获得

            if (!masking) {
                mplew.write(equip.getItemLevel()); //道具等级
                mplew.writeInt(equip.getItemExp()); //道具经验 客户端自动折算成百分比
                //System.out.println("不是点装");
            } else {
                mplew.write(HexTool.getByteArrayFromHexString("00 00 02 00 00 00 70 3E BC 5C 4C 07 CA 01"));
                //System.out.println("是点装");
            }
            mplew.writeInt(equip.getDurability()); //耐久度 最大值30000 客户端自动折算成百分比 没耐久度的装备发-1
            mplew.writeShort(equip.getVicious());//金锤子
            mplew.writeShort(0);
            mplew.writeShort(equip.getPvpWatk());//093新增 大乱斗攻击力
            mplew.write(equip.getIdentify());//1 未鉴定   0 C级 5 B级 6 A级 7 S级
            mplew.write(equip.getStarlevel());//星级
            mplew.writeShort(equip.getPotential_1());
            mplew.writeShort(equip.getPotential_2());
            mplew.writeShort(equip.getPotential_3());
            mplew.writeInt(0);
            mplew.writeLong(-1); //3F D6 00 00 24 01 00 18
            mplew.writeLong(DateUtil.getFileTimestamp(item.getExpiration() == null ? FINAL_TIME : item.getExpiration().getTime()));
            mplew.writeInt(-1);
        } else { //如果是物品道具
            mplew.writeShort(item.getQuantity()); //道具数量
            mplew.writeMapleAsciiString(item.getOwner());//道具拥有者
            mplew.writeShort(0);
            if (ii.isThrowingStar(item.getItemId()) || ii.isBullet(item.getItemId())) {
                //mplew.write(HexTool.getByteArrayFromHexString("02 00 00 00 54 00 00 34"));
                mplew.write(HexTool.getByteArrayFromHexString("CF 74 00 00 A5 00 00 18"));
            }
        }
    }

    //商城道具
    private static void addCashItemInfo(MaplePacketLittleEndianWriter mplew, IItem item, boolean zeroPosition, boolean leaveOut, boolean cs) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //System.out.println("加载点装"+item.getItemId());
        MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
        IEquip equip = null;
        boolean masking = false;
        boolean equipped = false;
        if (item.getType() == IItem.EQUIP) {
            equip = (IEquip) item;
        }
        short pos = item.getPosition();
        if (zeroPosition) {
            if (!leaveOut) {
                mplew.write(0);
            }
        } else if (pos <= (byte) -1) {
            pos *= -1;
            if (pos > 100 && pos < 1000) {
                mplew.write(pos - 100);
                masking = true;
            } else {
                mplew.write(pos);
            }
            equipped = true;
        } else {
            mplew.write(item.getPosition());//位置
        }
         if(item.getType() == IItem.EQUIP && !cs){ //生成装备列表时出现这个 但拣装备和在商城移动装备时不出现
             if(pos >= 1200 && pos < 1300) { //安卓
                 mplew.write(4);
                 //System.out.println("加载安卓cash装备"+item.getItemId());
             } else { //普通装备
                 mplew.write(0);//生成装备列表时出现这个 但拣装备时不出现
             }
         }
        mplew.write(item.getType());//类型
        mplew.writeInt(item.getItemId());//物品ID
        mplew.write((ii.isCash(item.getItemId())) || cs ? 1 : 0); // && equipped
        if (ii.isCash(item.getItemId()) || cs) { // && equipped
            mplew.writeLong(item.getUniqueId());
        }
        mplew.writeLong(DateUtil.getFileTimestamp(item.getExpiration() == null ? FINAL_TIME : item.getExpiration().getTime()));
        mplew.writeInt(-1);//新增
        if (item.getType() == IItem.EQUIP) {
          mplew.write(equip.getUpgradeSlots()); //可升级次数
            mplew.write(equip.getLevel()); //已升级次数
            mplew.writeShort(equip.getStr()); // 力量
            mplew.writeShort(equip.getDex()); // 敏捷
            mplew.writeShort(equip.getInt()); // 智力
            mplew.writeShort(equip.getLuk()); // 运气
            mplew.writeShort(equip.getHp()); // hp
            mplew.writeShort(equip.getMp()); // mp
            mplew.writeShort(equip.getWatk()); // 物理攻击
            mplew.writeShort(equip.getMatk()); // 魔法攻击
            mplew.writeShort(equip.getWdef()); // 物理防御
            mplew.writeShort(equip.getMdef()); // 魔法防御
            mplew.writeShort(equip.getAcc()); // 命中率
            mplew.writeShort(equip.getAvoid()); // 回避率
            mplew.writeShort(equip.getHands()); // 手技
            mplew.writeShort(equip.getSpeed()); // 移动速度
            mplew.writeShort(equip.getJump()); // 跳跃力
            mplew.writeMapleAsciiString(equip.getOwner()); //拥有者名字 两位
            short value =  (short) (equip.getLocked() | equip.getFlag());
            mplew.writeShort(value);
            mplew.write(0);//是否获得道具附加技能 0 不获得 1 获得
            mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00"));
            mplew.writeInt(-1);
            mplew.writeLong(0);
            mplew.writeLong(0);
            mplew.writeShort(0);//093新增
            mplew.writeLong(DateUtil.getFileTimestamp(System.currentTimeMillis()));
            mplew.writeInt(-1);
        } else {
            mplew.writeShort(item.getQuantity()); //道具数量
            mplew.writeMapleAsciiString(item.getOwner());//道具拥有者
            mplew.writeShort(0);
            if (ii.isThrowingStar(item.getItemId()) || ii.isBullet(item.getItemId())) {
                mplew.write(HexTool.getByteArrayFromHexString("02 00 00 00 54 00 00 34"));
            }
        }
    }

    //宠物系列
    private static void addPetItemInfo(MaplePacketLittleEndianWriter mplew, IItem item, boolean zeroPosition, boolean leaveOut, boolean cs) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
        IEquip equip = null;
        short pos = item.getPosition();
        if (zeroPosition) {
            if (!leaveOut) {
                mplew.write(0);
            }
        } else if (pos <= (byte) -1) {
            pos *= -1;
            if (pos > 100) {
                mplew.write(pos - 100);
            } else {
                mplew.write(pos);
            }
        } else {
            mplew.write(item.getPosition()); //位置
        }
        mplew.write(3);
        mplew.writeInt(item.getItemId());//物品ID
        mplew.write(1);
        mplew.writeInt(item.getUniqueId());//装备是否是唯一的
        mplew.writeInt(0);
        MaplePet pet = MaplePet.loadFromDb(item.getItemId(), item.getPosition(), item.getUniqueId());
        mplew.writeLong(DateUtil.getFileTimestamp(item.getExpiration() == null ? FINAL_TIME : item.getExpiration().getTime()));//时间
        mplew.writeInt(-1);//新增
        /*
        String petname = pet.getName();
        if (petname.getBytes().length > 13) {
            petname = petname.substring(0, 13);
        }
        mplew.writeAsciiString(petname); //宠物名称
        for (int i = petname.getBytes().length; i < 13; i++) {
            mplew.write(0);
        }
        */
        mplew.writeMapleNameString(pet.getName()); //自动填充到13位
        mplew.write(pet.getLevel()); //宠物等级
        mplew.writeShort(pet.getCloseness()); //宠物亲密度
        mplew.write(pet.getFullness()); //宠物饥饿度
        mplew.writeLong(DateUtil.getFileTimestamp(item.getExpiration() == null ? FINAL_TIME : item.getExpiration().getTime()));
        mplew.write(HexTool.getByteArrayFromHexString(
                "00 00 00 00 " +
                "00 00 00 00 " +
                "00 00 00 00 " +
                "00 00 00"));

    }

    //戒指信息
    private static void addRingItemInfo(MaplePacketLittleEndianWriter mplew, IItem item, boolean zeroPosition, boolean leaveOut, boolean cs) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //System.out.println("加载戒指装备"+item.getItemId());
        boolean ring = false;
        IEquip equip = null;
        if (item.getType() == IItem.EQUIP) {
            equip = (IEquip) item;
        }
        short pos = item.getPosition();

        if (zeroPosition) {
            if (!leaveOut) {
                mplew.write(0);
            }
        } else if (pos <= (byte) -1) {
            pos *= -1;
            if (pos > 100) {
                mplew.write(pos - 100);
            } else {
                mplew.write(pos);
            }
        } else {
            mplew.write(item.getPosition());
        }
        mplew.write(0);
        mplew.write(1);
        mplew.writeInt(item.getItemId());
        mplew.write(1);
        mplew.writeInt(equip.getUniqueId());
        mplew.writeInt(0);
        mplew.writeLong(DateUtil.getFileTimestamp(item.getExpiration() == null ? FINAL_TIME : item.getExpiration().getTime()));
        mplew.writeInt(-1);//新增
        mplew.write(equip.getUpgradeSlots());
        mplew.write(equip.getLevel());
        mplew.writeShort(equip.getStr()); // str
        mplew.writeShort(equip.getDex()); // dex
        mplew.writeShort(equip.getInt()); // int
        mplew.writeShort(equip.getLuk()); // luk
        mplew.writeShort(equip.getHp()); // hp
        mplew.writeShort(equip.getMp()); // mp
        mplew.writeShort(equip.getWatk()); // watk
        mplew.writeShort(equip.getMatk()); // matk
        mplew.writeShort(equip.getWdef()); // wdef
        mplew.writeShort(equip.getMdef()); // mdef
        mplew.writeShort(equip.getAcc()); // accuracy
        mplew.writeShort(equip.getAvoid()); // avoid
        mplew.writeShort(equip.getHands()); // hands
        mplew.writeShort(equip.getSpeed()); // speed
        mplew.writeShort(equip.getJump()); // jump
        mplew.writeMapleAsciiString(equip.getOwner());
        mplew.writeShort(0);// flag
        mplew.write(0); //skill
        mplew.write(0); //level
        mplew.writeInt(0); //exp
        mplew.writeInt(-1);//耐久度
        mplew.writeShort(0);//大乱斗攻击力
        mplew.writeShort(0);//金锤子
        mplew.writeShort(0);//
        mplew.write(0);
        mplew.write(0);
        mplew.writeShort(0);
        mplew.writeShort(0);
        mplew.writeShort(0);
        mplew.writeInt(0);
        mplew.writeLong(DateUtil.getFileTimestamp(System.currentTimeMillis()));
        mplew.writeInt(-1);
    }

   //返回错误信息
    public static MaplePacket getRelogResponse() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);
        mplew.writeShort(SendPacketOpcode.RELOG_RESPONSE.getValue());
        mplew.write(1);

        return mplew.getPacket();
    }

   //服务器公告
    public static MaplePacket serverMessage(String message) {
        return serverMessage(4, 0, message, true, false);
    }

    public static MaplePacket serverNotice(int type, String message) {
        return serverMessage(type, 0, message, false, false);
    }


    public static MaplePacket serverNotice(int type, int channel, String message) {
        return serverMessage(type, channel, message, false, false);
    }

    public static MaplePacket serverNotice(int type, int channel, String message, boolean smegaEar) {
        return serverMessage(type, channel, message, false, smegaEar);
    }

    private static MaplePacket serverMessage(int type, int channel, String message, boolean servermessage, boolean megaEar) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        mplew.write(type);//消息类型
        if (servermessage) {
            mplew.write(1);
        }
        mplew.writeMapleAsciiString(message);
        if (type == 3 || type == 0x0B || type == 0x0C) {
            mplew.write(channel - 1); // channel
            mplew.write(megaEar ? 1 : 0);

        }
        if (type == 6) {
            mplew.writeInt(0);
        }

        return mplew.getPacket();
    }

    public static MaplePacket getItemMega(int channel, String message, IItem item, boolean megaEar) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        mplew.write(0x0E);
        mplew.writeMapleAsciiString(message);
        mplew.writeInt(channel - 1); // channel
        addItemInfo(mplew, item, true, true, true);
        return mplew.getPacket();
    }

    public static MaplePacket getItemMegas(int channel, String message, IItem item, boolean megaEar) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        mplew.write(0x0E);
        mplew.writeMapleAsciiString(message);
        mplew.writeInt(channel - 1);
        addItemInfo(mplew, item, true, true, true);
        return mplew.getPacket();
    }

    public static MaplePacket getMegaphone(Items.MegaPhoneType type, int channel, String message, IItem item, boolean showEar) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        mplew.write(type.getValue());
        mplew.writeMapleAsciiString(message);
        if (type == Items.MegaPhoneType.SUPERMEGAPHONE) {
            mplew.write(channel - 1);
            mplew.write(showEar ? 1 : 0);
        } else if (type == Items.MegaPhoneType.ITEMMEGAPHONE) {
            mplew.write(channel - 1);
            mplew.write(showEar ? 1 : 0);
            if (item != null) {
               addItemInfo(mplew, item);
            } else {
                mplew.write(0);
            }
        }
        return mplew.getPacket();
    }

    public static MaplePacket getItemMegaI(int channel, String message, IItem item, boolean megaEar) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        mplew.write(8);
        mplew.writeMapleAsciiString(message);
        mplew.writeInt(channel - 1); // channel
        addItemInfo(mplew, item);
        return mplew.getPacket();
    }

    public static MaplePacket getMultiMega(int channel, List<String> message, boolean megaEar) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        mplew.write(0x0A);
        mplew.writeMapleAsciiString(message.get(0));
        mplew.write(message.size());
        for (int i = 0; i < message.size() - 1; i++) {
            mplew.writeMapleAsciiString(message.get(i + 1));
        }
        mplew.write((byte) (channel - 1)); // channel
        mplew.write(megaEar ? 1 : 0);
        return mplew.getPacket();
    }

    //情景喇叭
    public static MaplePacket getAvatarMega(MapleCharacter chr, int channel, int itemId, List<String> message, boolean ear) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.AVATAR_MEGA.getValue());
        mplew.writeInt(itemId);//喇叭ID
        mplew.writeMapleAsciiString(chr.getName());//使用者姓名
        for (String s : message) {
            mplew.writeMapleAsciiString(s);
        }
        mplew.writeInt(channel - 1); // channel
        mplew.write(ear ? 1 : 0);
        addCharLook(mplew, chr, true);//角色外观

        return mplew.getPacket();
    }

    /**
     * Gets a NPC spawn packet.
     *
     * @param life The NPC to spawn.
     * @return The NPC spawn packet.
     */
    public static MaplePacket spawnNPC(MapleNPC life) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SPAWN_NPC.getValue());
        mplew.writeInt(life.getObjectId());
        mplew.writeInt(life.getId());
        mplew.writeShort(life.getPosition().x);
        mplew.writeShort(life.getCy());
        mplew.write(life.getF() == 1 ? 0 : 1);
        mplew.writeShort(life.getFh());
        mplew.writeShort(life.getRx0());
        mplew.writeShort(life.getRx1());
        mplew.write(1);

        return mplew.getPacket();
    }

    public static MaplePacket spawnNPCRequestController(MapleNPC life, boolean show2) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SPAWN_NPC_REQUEST_CONTROLLER.getValue());
        mplew.write(1);
        mplew.writeInt(life.getObjectId());
        mplew.writeInt(life.getId());
        mplew.writeShort(life.getPosition().x);
        mplew.writeShort(life.getCy());
        mplew.write(life.getF() == 1 ? 0 : 1);
        mplew.writeShort(life.getFh());
        mplew.writeShort(life.getRx0());
        mplew.writeShort(life.getRx1());
        mplew.write(show2 ? 1 : 0);

        return mplew.getPacket();
    }


    public static MaplePacket removeNPC(int objid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.REMOVE_NPC.getValue());
        mplew.writeInt(objid);
        return mplew.getPacket();
    }

   public static MaplePacket spawnMonster(MapleMonster life, boolean newSpawn) {
        return spawnMonsterInternal(life, false, newSpawn, false, 0, false);
    }

    /**
     * Gets a spawn monster packet.
     *
     * @param life The monster to spawn.
     * @param newSpawn Is it a new spawn?
     * @param effect The spawn effect.
     * @return The spawn monster packet.
     */
    public static MaplePacket spawnMonster(MapleMonster life, boolean newSpawn, int effect) {
        return spawnMonsterInternal(life, false, newSpawn, false, effect, false);
    }

    /**
     * Gets a control monster packet.
     *
     * @param life The monster to give control to.
     * @param newSpawn Is it a new spawn?
     * @param aggro Aggressive monster?
     * @return The monster control packet.
     */
    public static MaplePacket controlMonster(MapleMonster life, boolean newSpawn, boolean aggro) {
        return spawnMonsterInternal(life, true, newSpawn, aggro, 0, false);
    }
/*
    public static MaplePacket makeMonsterInvisible(MapleMonster life) {
        return spawnMonsterInternal(life, true, false, false, 0, true);
    }
 *
 */

    /**
     * Internal function to handler monster spawning and controlling.
     *
     * @param life The mob to perform operations with.
     * @param requestController Requesting control of mob?
     * @param newSpawn New spawn (fade in?)
     * @param aggro Aggressive mob?
     * @param effect The spawn effect to use.
     * @return The spawn/control packet.
     */
    private static MaplePacket spawnMonsterInternal(MapleMonster life, boolean requestController, boolean newSpawn, boolean aggro, int effect, boolean makeInvis) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if (makeInvis) {
            //log.info("召唤怪物requestController2:"+life.getObjectId());
            //透明怪物 武陵道场打死boss之后抓到此包
            mplew.writeShort(SendPacketOpcode.SPAWN_MONSTER_CONTROL.getValue());
            mplew.write(0);
            mplew.writeInt(life.getObjectId());
            return mplew.getPacket();
        }
        if (requestController) {
            //log.info("召唤怪物requestController2:"+life.getObjectId());
            mplew.writeShort(SendPacketOpcode.SPAWN_MONSTER_CONTROL.getValue());
            if (aggro) {
                mplew.write(2);
            } else {
                mplew.write(1);
            }
        } else {
            //log.info("召唤怪物SPAWN_MONSTER:"+life.getObjectId());
            mplew.writeShort(SendPacketOpcode.SPAWN_MONSTER.getValue());
        }
        mplew.writeInt(life.getObjectId());
        mplew.write(1);
        mplew.writeInt(life.getId());//怪物ID
        mplew.write(new byte[24]); //093新增
        mplew.writeInt(0xE0);
        mplew.writeInt(0x88000000);
        mplew.writeInt(0);
        mplew.writeInt(0x64A0000);
        mplew.writeInt(0);
        mplew.writeInt(0x64A0000);
        mplew.writeInt(0);

        mplew.writeShort(life.getPosition().x);
        mplew.writeShort(life.getPosition().y);
        mplew.write(life.getStance());
        mplew.writeShort(0);//093修改
        mplew.writeShort(life.getFh());
        //这里应该是无论有无有effect都是要发送5个字节给客户端..
        if (effect > 0) {
            mplew.write(effect);
            mplew.write(0);
            mplew.writeShort(0);
            if (effect == 15) { //武陵道场召唤效果
                mplew.write(0);
            }
        }
        if(newSpawn) { //新召唤出来的怪有一个渐出效果
            mplew.write(-2);
        } else { //进入地图时原本存在的怪就直接出现
            mplew.write(-1);
        }
        mplew.write(-1);
        mplew.writeInt(0);
        //log.error("怪物封包:"+mplew.getPacket());
        return mplew.getPacket();
    }

    /**
     * Handles monsters not being targettable, such as Zakum's first body.
     * @param life The mob to spawn as non-targettable.
     * @param effect The effect to show when spawning.
     * @return The packet to spawn the mob as non-targettable.
     */
    public static MaplePacket spawnFakeMonster(MapleMonster life, int effect) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        log.info("SPAWN_MONSTER_CONTROL 假的ID:"+life.getObjectId());
        mplew.writeShort(SendPacketOpcode.SPAWN_MONSTER_CONTROL.getValue());
        mplew.write(1); //1 - 不攻击状态 2 - 攻击状态
        mplew.writeInt(life.getObjectId());
        mplew.write(life.getController() == null ? 5 : 1);
        mplew.writeInt(life.getId());
        mplew.write(new byte[24]);
        mplew.writeInt(0xE0);
        mplew.writeInt(0x88000000);
        mplew.write(new byte[20]);
        mplew.writeShort(life.getPosition().x);
        mplew.writeShort(life.getPosition().y);
        mplew.write(life.getStance());
        mplew.writeShort(life.getStartFh());
        mplew.writeShort(life.getFh());
        if (effect > 0) {
            mplew.write(effect);
            mplew.write(0);
            mplew.writeShort(0);
        }
        mplew.write(-2); //立刻出现是 -1 有出现效果是 -2
        mplew.write(-1);
        mplew.writeInt(0);
        return mplew.getPacket();
    }


    /**
     * Makes a monster previously spawned as non-targettable, targettable.
     * @param life The mob to make targettable.
     * @return The packet to make the mob targettable.
     */
    public static MaplePacket makeMonsterReal(MapleMonster life) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SPAWN_MONSTER.getValue());
        mplew.writeInt(life.getObjectId());
        mplew.write(1);
        mplew.writeInt(life.getId());//怪物ID
        mplew.write(0);
        mplew.writeShort(0);
        mplew.writeLong(0);
        mplew.writeInt(0);
        mplew.write(136);

        mplew.writeInt(0);
        mplew.writeShort(0);
        mplew.writeShort(life.getPosition().x);
        mplew.writeShort(life.getPosition().y);
        mplew.write(life.getStance());
        mplew.writeShort(life.getStartFh());
        mplew.writeShort(life.getFh());
        mplew.writeShort(-1);
        mplew.writeInt(0);

        return mplew.getPacket();
    }

    /**
     * Gets a stop control monster packet.
     *
     * @param oid The ObjectID of the monster to stop controlling.
     * @return The stop control monster packet.
     */
    public static MaplePacket stopControllingMonster(int oid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SPAWN_MONSTER_CONTROL.getValue());
        mplew.write(0);
        mplew.writeInt(oid);

        return mplew.getPacket();
    }

    /**
     * Gets a response to a move monster packet.
     *
     * @param objectid The ObjectID of the monster being moved.
     * @param moveid The movement ID.
     * @param currentMp The current MP of the monster.
     * @param useSkills Can the monster use skills?
     * @return The move response packet.
     */
    public static MaplePacket moveMonsterResponse(int objectid, short moveid, int currentMp, boolean useSkills) {
        return moveMonsterResponse(objectid, moveid, currentMp, useSkills, 0, 0);
    }

    /**
     * Gets a response to a move monster packet.
     *
     * @param objectid The ObjectID of the monster being moved.
     * @param moveid The movement ID.
     * @param currentMp The current MP of the monster.
     * @param useSkills Can the monster use skills?
     * @param skillId The skill ID for the monster to use.
     * @param skillLevel The level of the skill to use.
     * @return The move response packet.
     */
    public static MaplePacket moveMonsterResponse(int objectid, short moveid, int currentMp, boolean useSkills, int skillId, int skillLevel) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //1F 01 [A1 82 B2 05] [10 00] [00] [0A 00] [00] [00]
        //4F 01 [16 38 0C 00] [01 00] [00] [0A 00] [00] [00] 00 00 00 00 //093新增int
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MOVE_MONSTER_RESPONSE.getValue());
        mplew.writeInt(objectid);
        mplew.writeShort(moveid);
        mplew.write(useSkills ? 1 : 0);
        mplew.writeShort(currentMp);
        mplew.write(skillId);
        mplew.write(skillLevel);
        mplew.writeInt(0);//新增
        return mplew.getPacket();
    }

    /**
     * 普通聊天获取数据包。
     *
     * @param cidfrom The character ID who sent the chat.
     * @param text The text of the chat.
     * @param whiteBG
     * @param show
     * @return The general chat packet.
     */
    //[B3 00] [E5 B3 29 00] [00] 08 00 CE D2 CA C7 C4 E3 C2 E8 00
    public static MaplePacket getChatText(int cidfrom, String text, boolean whiteBG, int show2) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CHATTEXT.getValue());
        mplew.writeInt(cidfrom);
        mplew.write(whiteBG ? 1 : 0);//字是否是白色背景
        mplew.writeMapleAsciiString(text);//说话的内容
        mplew.write(show2);
        return mplew.getPacket();
    }

    /**
     * 增加经验值。
     * @param gain The amount of EXP gained.获取经验的数量
     * @param inChat In the chat box?
     * @param white White text or yellow?白色或者蓝色
     * @return The exp gained packet.
     */
    public static MaplePacket getShowExpGain(int gain, boolean inChat, boolean white) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(3); // 0 = 显示未能找到掉在地上的部分金额 1 2=没效果 4 = 获得SP 3 = 经验, 5 = 人气, 6 = 金币, 7 = 家族CP
        mplew.write(white ? 1 : 0);
        mplew.writeInt(gain);
        mplew.write(0);
        mplew.write(inChat ? 1 : 0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeInt(0);
        mplew.writeShort(0);
        mplew.write(new byte[4]);//093新增
        return mplew.getPacket();
    }

    /**
     * 增加人气
     * @param gain How many fame gained.
     * @return The meso gain packet.
     */
    public static MaplePacket getShowFameGain(int gain) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(5);
        mplew.writeInt(gain);

        return mplew.getPacket();
    }

    //金币
    public static MaplePacket getShowMesoGain(int gain) {
        return getShowMesoGain(gain, false);
    }

    /**
     * Gets a packet telling the client to show a meso gain.
     * 增加金币
     * @param gain How many mesos gained.
     * @param inChat Show in the chat window?
     * @return The meso gain packet.
     */
    public static MaplePacket getShowMesoGain(int gain, boolean inChat) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        if (!inChat) {
            mplew.write(0);
            mplew.write(1);
            mplew.write(0);
        } else {
            mplew.write(6);
        }
        mplew.writeLong(gain);//094修改

        return mplew.getPacket();
    }

    // 物品道具
    public static MaplePacket getShowItemGain(int itemId, short quantity) {
        return getShowItemGain(itemId, quantity, false);
    }

    /**
     * Gets a packet telling the client to show an item gain.
     * 获得物品
     * @param itemId The ID of the item gained.
     * @param quantity The number of items gained.
     * @param inChat Show in the chat window?
     * @return The item gain packet.
     */
    public static MaplePacket getShowItemGain(int itemId, short quantity, boolean inChat) {

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if (inChat) {
            mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
            mplew.write(0);
            mplew.write(0);
            mplew.writeInt(itemId);//物品ID
            mplew.writeInt(quantity);//物品数量
        } else {
            mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
            mplew.writeShort(0);
            mplew.writeInt(itemId);//物品ID
            mplew.writeInt(quantity);//获得物品的数量
            mplew.writeInt(0);
            mplew.writeInt(0);
        }

        return mplew.getPacket();
    }

    public static MaplePacket killMonster(int oid, boolean animation) {
        return killMonster(oid, animation ? 1 : 0);
    }

    /**
     * 杀死怪物的方法
     *
     * @param oid The objectID of the killed monster.
     * @param animation 0 = disapear, 1 = fade out, 2+ = special
     * @return The kill monster packet.
     */
    public static MaplePacket killMonster(int oid, int animation) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //1C 01 93 65 F7 08 01   //089
        mplew.writeShort(SendPacketOpcode.KILL_MONSTER.getValue());
        mplew.writeInt(oid);
        mplew.write(1); //死的类型 死的时候显示的动画
        return mplew.getPacket();
    }

    //吞噬技能的杀怪效果
    public static MaplePacket SpecialKillMonster(int oid, int characterid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.KILL_MONSTER.getValue());
        mplew.writeInt(oid);
        mplew.write(4); //死的类型 死的时候显示的动画
        mplew.writeInt(characterid);
        return mplew.getPacket();
    }
    /**
     * Gets a packet telling the client to show mesos coming out of a map
     * object.
     *
     * @param amount The amount of mesos.
     * @param itemoid The ObjectID of the dropped mesos.
     * @param dropperoid The OID of the dropper.
     * @param ownerid The ID of the drop owner.
     * @param dropfrom Where to drop from.
     * @param dropto Where the drop lands.
     * @param mod ?
     * @return The drop mesos packet.
     */
    public static MaplePacket dropMesoFromMapObject(int amount, int itemoid, int dropperoid, int ownerid, Point dropfrom, Point dropto, byte mod) {
        return dropItemFromMapObjectInternal(amount, itemoid, dropperoid, ownerid, dropfrom, dropto, mod, true);
    }

    /**
     * Gets a packet telling the client to show an item coming out of a map
     * object.
     *
     * @param itemid The ID of the dropped item.
     * @param itemoid The ObjectID of the dropped item.
     * @param dropperoid The OID of the dropper.
     * @param ownerid The ID of the drop owner.
     * @param dropfrom Where to drop from.
     * @param dropto Where the drop lands.
     * @param mod ?
     * @return The drop mesos packet.
     */
    public static MaplePacket dropItemFromMapObject(int itemid, int itemoid, int dropperoid, int ownerid, Point dropfrom, Point dropto, byte mod) {
        return dropItemFromMapObjectInternal(itemid, itemoid, dropperoid, ownerid, dropfrom, dropto, mod, false);
    }

    /**
     * Internal function to get a packet to tell the client to drop an item onto
     * the map.
     *
     * @param itemid The ID of the item to drop.
     * @param itemoid The ObjectID of the dropped item.
     * @param dropperoid The OID of the dropper.
     * @param ownerid The ID of the drop owner.
     * @param dropfrom Where to drop from.
     * @param dropto Where the drop lands.
     * @param mod ?
     * @param mesos Is the drop mesos?
     * @return The item drop packet.
     */
    public static MaplePacket dropItemFromMapObjectInternal(int itemid, int itemoid, int dropperoid, int ownerid, Point dropfrom, Point dropto, byte mod, boolean mesos) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //44 01 [01] [0F 00 00 00] [00] [8C 4A 0F 00] [E5 B3 29 00] [00] [DC 00] [A2 00] [00 00 00 00] [DC 00] [A2 00] [00] [00] [00] [80] [05 BB 46 E6 17 02 00 00]
        /*
         * 44 01
         * 01
         * BB 06 00 00
         * 00
         * 90 14 25 00
         * 27 52 00 00
         * 00
         * 6E 09
         * D3 01
         * 00 00 00 00
         * 6E 09
         * D3 01
         * 00
         * 00
         * 00
         * 80
         * 05 BB 46 E6 17 02 00 00 //time
         */
        mplew.writeShort(SendPacketOpcode.DROP_ITEM_FROM_MAPOBJECT.getValue());
        mplew.write(mod);//MOB
        mplew.writeInt(itemoid);
        mplew.write(mesos ? 1 : 0); // 1 = 金币, 0 = 物品
        mplew.writeInt(itemid);//物品ID
        mplew.writeInt(ownerid); // owner charid
        mplew.write(0);
        mplew.writeShort(dropto.x);
        mplew.writeShort(dropto.y);
        if (mod != 2) {
            mplew.writeInt(0);
            mplew.writeShort(dropfrom.x);
            mplew.writeShort(dropfrom.y);
        } else {
            mplew.writeInt(dropperoid);
        }
        mplew.write(0x76);
        mplew.write(2);
        if (mod != 2) {
            mplew.write(1); //fuck knows
            mplew.write(0); //PET Meso pickup
        }
        if (!mesos) {
            mplew.writeLong(DateUtil.getFileTimestamp(System.currentTimeMillis()));
        }

        return mplew.getPacket();
    }

    /* (non-javadoc)
     * TODO: make MapleCharacter a mapobject, remove the need for passing oid
     * here.
     */
    /**
     * Gets a packet spawning a player as a mapobject to other clients.
     *
     * @param chr The character to spawn to other clients.
     * @return The spawn player packet.
     */

    private static final Random RAND = new Random();
    public static MaplePacket spawnPlayerMapobject(MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SPAWN_PLAYER.getValue());
        mplew.writeInt(chr.getId());
        mplew.write(chr.getLevel());
        mplew.writeMapleAsciiString(chr.getName());
        mplew.writeShort(0);//092 这个包是在家族包前面的
        if (chr.getGuildId() <= 0) {
            mplew.writeMapleAsciiString("");
            mplew.write(new byte[6]);
        } else {
            MapleGuildSummary gs = chr.getClient().getChannelServer().getGuildSummary(chr.getGuildId());
            if (gs != null) {
                mplew.writeMapleAsciiString(gs.getName());
                mplew.writeShort(gs.getLogoBG());
                mplew.write(gs.getLogoBGColor());
                mplew.writeShort(gs.getLogo());
                mplew.write(gs.getLogoColor());
            } else {
                mplew.writeMapleAsciiString("");
                mplew.write(new byte[6]);
            }
        }
        mplew.write(new byte[3]);//093新增
        mplew.write(-1);//093新增
        mplew.write(new byte[20]);//093新增
        mplew.writeInt(chr.getBuffedValue(MapleBuffStat.MORPH) != null ? 2 : 0);
        long buffmask = 0;
        Integer buffvalue = null;
        if (chr.getBuffedValue(MapleBuffStat.DARKSIGHT) != null && !chr.isHidden()) { //隐身术
            buffmask |= MapleBuffStat.DARKSIGHT.getValue();
        } else if (chr.getBuffedValue(MapleBuffStat.COMBO) != null) { //斗气集中
            buffmask |= MapleBuffStat.COMBO.getValue();
            buffvalue = Integer.valueOf(chr.getBuffedValue(MapleBuffStat.COMBO).intValue());
        } else if (chr.getBuffedValue(MapleBuffStat.SHADOWPARTNER) != null) {//影分身
            buffmask |= MapleBuffStat.SHADOWPARTNER.getValue();
            buffvalue = Integer.valueOf(chr.getBuffedValue(MapleBuffStat.SHADOWPARTNER).intValue());
        } else if (chr.getBuffedValue(MapleBuffStat.MORPH) != null) { //变身
            buffvalue = Integer.valueOf(chr.getBuffedValue(MapleBuffStat.MORPH).intValue());
        }
        if (chr.getBuffedValue(MapleBuffStat.MORPH) != null) //变身
            mplew.writeInt(128); //0x80
        else
            mplew.writeInt((int) ((buffmask >> 32) & 0xffffffffL));
        if (buffvalue != null) {
            if (chr.getBuffedValue(MapleBuffStat.MORPH) != null) { //变身
                mplew.write(40); //0x28
                mplew.writeShort(buffvalue.shortValue()); //变身的id 1001
                mplew.writeInt(chr.getBuffSource(MapleBuffStat.MORPH)); //skillid
            } else if (chr.getBuffedValue(MapleBuffStat.SHADOWPARTNER) != null) { //影分身
                mplew.writeInt(buffvalue.shortValue());
                mplew.writeInt(chr.getBuffSource(MapleBuffStat.SHADOWPARTNER)); //skillid
            } else {
                mplew.write(buffvalue.byteValue()); //斗气
            }
        }
        mplew.writeInt((int) (buffmask & 0xFFFFFFFF));//092
        mplew.write(new byte[7]);
        int CHAR_MAGIC_SPAWN = RAND.nextInt();
        mplew.writeInt(CHAR_MAGIC_SPAWN); //1
        mplew.write(new byte[11]);
        mplew.writeInt(CHAR_MAGIC_SPAWN); //2
        mplew.write(new byte[11]);
        mplew.writeInt(CHAR_MAGIC_SPAWN); //3
        mplew.write(new byte[3]);
        boolean a = chr.getUsingMount() != null;
        mplew.writeInt(a ? chr.getUsingMount().getUsingItemId() : 0);
        mplew.writeInt(a ? chr.getUsingMount().getUsingSkillId() : 0);
        mplew.writeInt(CHAR_MAGIC_SPAWN); //4
        mplew.write(new byte[9]);
        mplew.writeInt(CHAR_MAGIC_SPAWN);//5
        mplew.write(0); //093修改
        mplew.write(chr.isMarried() ? 1 : 0); //093修改
        mplew.writeInt(new Random().nextInt());
        mplew.write(new byte[10]);
        mplew.writeInt(CHAR_MAGIC_SPAWN);//6
        mplew.write(new byte[17]);//093修改 92..13
        mplew.writeInt(CHAR_MAGIC_SPAWN);//7
        mplew.write(new byte[11]);
        mplew.writeInt(CHAR_MAGIC_SPAWN);//8
        mplew.write(0);
        mplew.writeShort((short) chr.getJob().getId());
        addCharLook(mplew, chr, false);
        mplew.write(new byte[20]);//092: 12  093: 20
        mplew.writeInt(chr.getInventory(MapleInventoryType.CASH).countById(5110000));
        mplew.writeInt(chr.getItemEffect());
        mplew.writeLong(0);
        //mplew.writeLong(0); //093--
        mplew.writeInt(-1);
        mplew.writeInt(chr.getChair());
        mplew.writeShort(chr.getPosition().x);
        mplew.writeShort(chr.getPosition().y);
        mplew.write(chr.getStance());
        mplew.writeShort(chr.getFh());
        mplew.write(0);
        mplew.writeInt(chr.getMount() != null ? chr.getMount().getLevel() : 1);
        mplew.writeInt(chr.getMount() != null ? chr.getMount().getExp() : 0);
        mplew.writeInt(chr.getMount() != null ? chr.getMount().getTiredness() : 0);
        mplew.write(0);
        mplew.write(chr.getChalkboard() != null ? 1 : 0);
        if (chr.getChalkboard() != null)
            mplew.writeMapleAsciiString(chr.getChalkboard()); //有黑板的时候这里占2个 00
        addRings2(mplew, chr, false);//戒指效果函数
        return mplew.getPacket();
    }

    //适用于 updatecharlook spawnPlayerMapobject
        private static void addRings2(MaplePacketLittleEndianWriter mplew, MapleCharacter chr, boolean isUpdateCharlook) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MapleInventory iv = chr.getInventory(MapleInventoryType.EQUIPPED);
        Collection<IItem> equippedC = iv.list();
        boolean 结婚戒指 = false;
        List<IEquip> 恋人戒指 = new ArrayList<IEquip>();
        List<IEquip> 友谊戒指 = new ArrayList<IEquip>();
        for (IItem item : equippedC) {
            if (item.友谊戒指()) {
                友谊戒指.add(MapleRing.loadFromDb(item.getItemId(), item.getPosition(), item.getUniqueId()));
            } else if(item.恋人戒指()){
                恋人戒指.add(MapleRing.loadFromDb(item.getItemId(), item.getPosition(), item.getUniqueId()));
            } else if(item.结婚戒指()) {
                结婚戒指 = true;
            }
        }
        mplew.write(恋人戒指.size());
        for (IEquip ring : 恋人戒指) {
                mplew.writeInt(1);
                mplew.writeInt(ring.getUniqueId()); //戒指的uniqueid
                mplew.writeInt(0);
                mplew.writeInt(ring.getPartnerUniqueId()); //对方戒指的uniqueid 对应Ring表里的partnerRingId
                mplew.writeInt(0);
                mplew.writeInt(ring.getItemId());
        }
        mplew.write(友谊戒指.size());
        for (IEquip ring : 友谊戒指) {
                mplew.writeInt(1);
                mplew.writeInt(ring.getUniqueId()); //戒指的uniqueid
                mplew.writeInt(0);
                mplew.writeInt(ring.getPartnerUniqueId()); //对方戒指的uniqueid 对应Ring表里的partnerRingId
                mplew.writeInt(0);
                mplew.writeInt(ring.getItemId());
        }
        boolean 带结婚戒指 = 结婚戒指;
        mplew.write(带结婚戒指 ? 1 : 0);//带结婚戒指 是1  否0
        if(带结婚戒指){
            mplew.writeInt(chr.getId());//自己的cid
            mplew.writeInt(chr.getPartner().getId());//配偶的cid
        } else if(!带结婚戒指 && !isUpdateCharlook) {
            mplew.writeShort(0);
        }
        mplew.writeShort(0);
        if(isUpdateCharlook) {
            mplew.writeShort(0);
        }
    }

    //人物表情
    public static MaplePacket facialExpression(MapleCharacter from, int expression) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.FACIAL_EXPRESSION.getValue());
        mplew.writeInt(from.getId());
        mplew.writeInt(expression);
        mplew.writeInt(-1);
        mplew.write(0);
        return mplew.getPacket();
    }

    private static void serializeMovementList(LittleEndianWriter lew, List<LifeMovementFragment> moves) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        lew.writeInt(0);//V.091
        lew.write(moves.size()); //移动的次数
        for (LifeMovementFragment move : moves) {
            move.serialize(lew);
        }
    }

    public static MaplePacket movePlayer(int cid, List<LifeMovementFragment> moves) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MOVE_PLAYER.getValue());
        mplew.writeInt(cid);
        mplew.writeInt(0);
        serializeMovementList(mplew, moves);

        return mplew.getPacket();
    }

    public static MaplePacket moveSummon(int cid, int oid, Point startPos, List<LifeMovementFragment> moves) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MOVE_SUMMON.getValue());
        mplew.writeInt(cid);
        mplew.writeInt(oid);
        mplew.writeShort(startPos.x);
        mplew.writeShort(startPos.y);
        serializeMovementList(mplew, moves);

        return mplew.getPacket();
    }

     public static MaplePacket moveDragon(int cid, Point startPos, List<LifeMovementFragment> moves) {
         if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*
         * E4 00
         * 1F 0C 74 00
         * 31 00
         * 91 05
         * 00 00 00 00
         * 01
         * 00 EE FF 91 05 FF FF 00 00 00 00 00 00 00 00 03 FE 01
         */
        mplew.writeShort(SendPacketOpcode.DRAGON_MOVE.getValue());
        mplew.writeInt(cid);
        mplew.writeShort(startPos.x);
        mplew.writeShort(startPos.y);
        serializeMovementList(mplew, moves);
        return mplew.getPacket();
    }

    public static MaplePacket moveMonster(int useskill, int skill, int skill_1, int skill_2, int skill_3, int skill_4, int oid, Point startPos, Point nextPos, List<LifeMovementFragment> moves) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MOVE_MONSTER.getValue());
        mplew.writeInt(oid);
        mplew.writeShort(0);
        mplew.write(useskill); // 0
        mplew.write(skill); // -1
        mplew.write(skill_1); // 0
        mplew.write(skill_2); // 0
        mplew.write(skill_3); // 0
        mplew.write(skill_4); // 0
        mplew.writeLong(0);
        mplew.writePos(startPos);
        mplew.writePos(nextPos);
        serializeMovementList2(mplew, moves);
        return mplew.getPacket();
    }


    private static void serializeMovementList2(LittleEndianWriter lew, List<LifeMovementFragment> moves) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        lew.write(moves.size()); //移动的次数
        for (LifeMovementFragment move : moves) {
            move.serialize(lew);
        }
    }

    public static MaplePacket summonAttack(MapleCharacter chr, int summonOid, int newStance, List<SummonAttackEntry> allDamage) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //45 01 [21 DF 49 00] [C2 7C 05 00] A6 84 01 43 19 A3 00 07 0A 3C 00 00 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SUMMON_ATTACK.getValue());
        mplew.writeInt(chr.getId());
        mplew.writeInt(summonOid);
        mplew.write(chr.getLevel()); //093新增
        mplew.write(newStance);
        mplew.write(allDamage.size());
        for (SummonAttackEntry attackEntry : allDamage) {
            mplew.writeInt(attackEntry.getMonsterOid()); // oid
            //mplew.write(1); //093去除
            mplew.write(7); //093修改
            mplew.writeInt(attackEntry.getDamage()); // damage
        }
        mplew.write(0); //093新增
        return mplew.getPacket();
    }

    //召唤兽受伤
    public static MaplePacket damageSummon(int cid, int summonOid, int damage, int monsterIdFrom, int unkByte) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // 77 00 [29 1D 02 00] [FA FE 30 00] 00 [10 00 00 00] [BF 70 8F 00] 00
        // 4A 01 [7A 1F 47 00[ [C8 0C 01 00] 00 [69 01 00 00] [0C 7C 92 00] 01
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.DAMAGE_SUMMON.getValue());
        mplew.writeInt(cid);
        mplew.writeInt(summonOid);
        mplew.write(0);
        mplew.writeInt(damage);
        mplew.writeInt(monsterIdFrom);
        mplew.write(unkByte);
        return mplew.getPacket();
    }

    public static MaplePacket Combo_Effect(int combo) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.COMBO_EFFECE.getValue());
        mplew.writeInt(combo);

        return mplew.getPacket();
    }



   //近距离攻击
    public static MaplePacket closeRangeAttack(int cid, int skill, int stance, int numAttackedAndDamage, List<Pair<Integer, List<Integer>>> damage, int speed, int pos) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CLOSE_RANGE_ATTACK.getValue());
        if (skill == 4211006) { // 金钱炸弹
            addMesoExplosion(mplew, cid, skill, stance, numAttackedAndDamage, 0, damage, speed, pos);
        } else {
            addAttackBody(mplew, cid, skill, stance, numAttackedAndDamage, 0, damage, speed, pos);
        }
        return mplew.getPacket();
    }


    //远程攻击
    public static MaplePacket rangedAttack(int cid, int skill, int stance, int numAttackedAndDamage, int projectile, List<Pair<Integer, List<Integer>>> damage, int speed, Short x, Short y, int pos) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // 7E 00 30 75 00 00 01 00 97 04 0A CB 72 1F 00
        // D3 00 [57 4B 02 00 01 00 00 00 1F 80 06 00 E0 6E 1F 00 00 00 00 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.RANGED_ATTACK.getValue());
        addAttackBody(mplew, cid, skill, stance, numAttackedAndDamage, projectile, damage, speed, pos);
        mplew.writeInt(0);
        return mplew.getPacket();
    }

    //魔法师攻击
    public static MaplePacket magicAttack(int cid, int skill, int stance, int numAttackedAndDamage, List<Pair<Integer, List<Integer>>> damage, int charge, int speed, int pos) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MAGIC_ATTACK.getValue());
        addAttackBody(mplew, cid, skill, stance, numAttackedAndDamage, 0, damage, speed, pos);
        if (charge != -1) {
            mplew.writeInt(charge);
        }

        return mplew.getPacket();
    }

    //攻击的母方法
    private static void addAttackBody(LittleEndianWriter lew, int cid, int skill, int stance, int numAttackedAndDamage, int projectile, List<Pair<Integer, List<Integer>>> damage, int speed, int pos) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        lew.writeInt(cid);
        lew.write(numAttackedAndDamage);
        lew.write(0);
        if (skill > 0) {
            lew.write(0xFF); // too low and some skills don't work (?)
            lew.writeInt(skill);
        } else {
            lew.write(0);
        }
        lew.write(0);
        lew.write(pos);
        lew.write(stance);
        lew.write(speed);
        lew.write(0);
        lew.writeInt(projectile);

        for (Pair<Integer, List<Integer>> oned : damage) {
            if (oned.getRight() != null) {
                lew.writeInt(oned.getLeft().intValue());
                lew.write(0x07);//091
                for (Integer eachd : oned.getRight()) {
                    lew.writeInt(skill == 弩手.一击要害箭 ? eachd.intValue() + 0x80000000 : eachd.intValue());
                }
            }
        }
    }

    private static void addMesoExplosion(LittleEndianWriter lew, int cid, int skill, int stance, int numAttackedAndDamage, int projectile, List<Pair<Integer, List<Integer>>> damage, int speed, int pos) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // BC 00 90 E5 2F 00 00 5A 1A 3E 41 40 00 00 3F 00 03 0A 00 00 00 00 //078
        lew.writeInt(cid);
        lew.write(numAttackedAndDamage);
        lew.write(0x5A);
        lew.write(0x1A);
        lew.writeInt(skill);
        lew.write(0);
        lew.write(pos);
        lew.write(stance);
        lew.write(speed);
        lew.write(0x0A);
        lew.writeInt(projectile);

        for (Pair<Integer, List<Integer>> oned : damage) {
            if (oned.getRight() != null) {
                lew.writeInt(oned.getLeft().intValue());
                lew.write(0xFF);
                lew.write(oned.getRight().size());
                for (Integer eachd : oned.getRight()) {
                    lew.writeInt(eachd.intValue());
                }
            }
        }

    }

    //NPC商店
    public static MaplePacket getNPCShop(MapleClient c, int sid, List<MapleShopItem> items) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.OPEN_NPC_SHOP.getValue());
        mplew.writeInt(sid); //商店ID
        mplew.writeShort(items.size()); // 物品数量
        for (MapleShopItem item : items) {
            mplew.writeInt(item.getItemId());//物品ID
            mplew.writeInt(item.getPrice());//物品价格
            mplew.writeInt(0);//如果不是扣除Meso 而是扣除item获得物品的话这里就填扣除的itemid
            mplew.writeInt(0);//要扣除的item数量
            mplew.writeLong(0);
            if (!ii.isThrowingStar(item.getItemId()) && !ii.isBullet(item.getItemId())) { //非海星标和子弹
                mplew.writeShort(1); // 数据大小? o.o
                mplew.writeShort(item.getBuyable()); //道具是可买的
            } else {
                mplew.writeShort(0);
                mplew.writeInt(0);
                // o.O getPrice有时返回unitPrice价格不是这个
                mplew.writeShort(BitTools.doubleToShortBits(ii.getPrice(item.getItemId())));
                mplew.writeShort(ii.getSlotMax(c, item.getItemId())); //最大数量
            }
        }
        return mplew.getPacket();
    }

    /**
     * code (8 = sell, 0 = buy, 0x20 = due to an error the trade did not happen
     * o.o)
     *确认商店交易
     * @param code
     * @return
     */
    public static MaplePacket confirmShopTransaction(byte code) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CONFIRM_SHOP_TRANSACTION.getValue());
        // mplew.writeShort(0xE6); // 47 E4
        mplew.write(code); // recharge == 8?

        return mplew.getPacket();
    }

    /*
     * 19 reference 00 01 00 = new while adding 01 01 00 = add from drop 00 01 01 = update count 00 01 03 = clear slot
     * 01 01 02 = move to empty slot 01 02 03 = move and merge 01 02 01 = move and merge with rest
     增加物品到背包
     */
    public static MaplePacket addInventorySlot(MapleInventoryType type, IItem item) {
        return addInventorySlot(type, item, false);
    }

   //增加物品到背包
    public static MaplePacket addInventorySlot(MapleInventoryType type, IItem item, boolean fromDrop) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        if (fromDrop) {
            mplew.write(1);
        } else {
            mplew.write(0);
        }
        mplew.write(HexTool.getByteArrayFromHexString("01 00")); // add mode
        mplew.write(type.getType()); // iv type
        mplew.write(item.getPosition()); // slot id
        addItemInfo(mplew, item, true, false, true);

        return mplew.getPacket();
    }

    //更新背包位置
    public static MaplePacket updateInventorySlot(MapleInventoryType type, IItem item) {
        return updateInventorySlot(type, item, false);
    }

    public static MaplePacket updateInventorySlot(MapleInventoryType type, IItem item, boolean fromDrop) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        if (fromDrop) {
            mplew.write(1);
        } else {
            mplew.write(0);
        }
        mplew.write(HexTool.getByteArrayFromHexString("01 01")); // update
        // mode
        mplew.write(type.getType()); // iv type
        mplew.write(item.getPosition()); // slot id
        mplew.write(0); // ?
        mplew.writeShort(item.getQuantity());

        return mplew.getPacket();
    }

    //移动背包物品
    public static MaplePacket moveInventoryItem(MapleInventoryType type, short src, short dst) {
        return moveInventoryItem(type, src, dst, (byte) -1);
    }

    public static MaplePacket moveInventoryItem(MapleInventoryType type, short src, short dst, byte equipIndicator) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("01 01 02"));
        mplew.write(type.getType());
        mplew.writeShort(src);
        mplew.writeShort(dst);
        if (equipIndicator != -1) {
            mplew.write(equipIndicator);
        }
        //System.out.println("移动装备包："+mplew.getPacket());
        return mplew.getPacket();
    }


    //整理物品(暂时没这功能)
    public static MaplePacket moveAndMergeInventoryItem(MapleInventoryType type, short src, short dst, short total) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("01 02 03"));
        mplew.write(type.getType());
        mplew.writeShort(src);
        mplew.write(1); // merge mode?
        mplew.write(type.getType());
        mplew.writeShort(dst);
        mplew.writeShort(total);

        return mplew.getPacket();
    }

    //集合物品(暂时没这功能)
    public static MaplePacket moveAndMergeWithRestInventoryItem(MapleInventoryType type, short src, short dst, short srcQ, short dstQ) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("01 02 01"));
        mplew.write(type.getType());
        mplew.writeShort(src);
        mplew.writeShort(srcQ);
        mplew.write(HexTool.getByteArrayFromHexString("01"));
        mplew.write(type.getType());
        mplew.writeShort(dst);
        mplew.writeShort(dstQ);

        return mplew.getPacket();
    }

    //清除背包物品
    public static MaplePacket clearInventoryItem(MapleInventoryType type, short slot, boolean fromDrop) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(fromDrop ? 1 : 0);
        mplew.write(HexTool.getByteArrayFromHexString("01 03"));
        mplew.write(type.getType());
        mplew.writeShort(slot);

        return mplew.getPacket();
    }

    public static MaplePacket scrolledItem(IItem scroll, IItem item, boolean destroyed) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // 18 00 01 02 03 02 08 00 03 01 F7 FF 01
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
		mplew.write(1);
		mplew.write(destroyed ? 2 : 3);
		mplew.write(scroll.getQuantity() <= 0 ? 3 : 1);
		mplew.write(GameConstants.getInventoryType(scroll.getItemId()).getType());
		mplew.writeShort(scroll.getPosition());
		if (scroll.getQuantity() > 0)
			mplew.writeShort(scroll.getQuantity());
		mplew.write(3);
		if (!destroyed)
		{
			mplew.write(MapleInventoryType.EQUIP.getType());
			mplew.writeShort(item.getPosition());
			mplew.write(0);
		}
		mplew.write(MapleInventoryType.EQUIP.getType());
		mplew.writeShort(item.getPosition());
		if (!destroyed)
			addItemInfo(mplew, item, true, true, true);
		mplew.write(1);
		return mplew.getPacket();
	}

    public static MaplePacket getScrollEffect(int chr, ScrollResult scrollSuccess, boolean legendarySpirit) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_SCROLL_EFFECT.getValue());
        mplew.writeInt(chr);
        switch (scrollSuccess) {
            case SUCCESS:
                mplew.writeShort(1);
                mplew.writeShort(legendarySpirit ? 1 : 0);
                break;
            case FAIL:
                mplew.writeShort(0);
                mplew.writeShort(legendarySpirit ? 1 : 0);
                break;
            case CURSE:
                mplew.write(0);
                mplew.write(1);
                mplew.writeShort(legendarySpirit ? 1 : 0);
                break;
            default:
                throw new IllegalArgumentException("effect in illegal range");
        }

        return mplew.getPacket();
    }

    //移除玩家从地图
    public static MaplePacket removePlayerFromMap(int cid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.REMOVE_PLAYER_FROM_MAP.getValue());
        mplew.writeInt(cid);
        return mplew.getPacket();
    }

    /**
     * animation: 0 - expire<br/> 1 - without animation<br/> 2 - pickup<br/>
     * 4 - explode<br/> cid is ignored for 0 and 1
     *
     * @param oid
     * @param animation
     * @param cid
     * @return
     */
    //移除道具从地图
    public static MaplePacket removeItemFromMap(int oid, int animation, int cid) {
        return removeItemFromMap(oid, animation, cid, false, 0);
    }

    /**
     * animation: 0 - expire<br/> 1 - without animation<br/> 2 - pickup<br/>
     * 4 - explode<br/> cid is ignored for 0 and 1.<br /><br />Flagging pet
     * as true will make a pet pick up the item.
     *
     * @param oid
     * @param animation
     * @param cid
     * @param pet
     * @param slot
     * @return
     */
    public static MaplePacket removeItemFromMap(int oid, int animation, int cid, boolean pet, int slot) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //79 01 [05] [A5 3D 00 00] [47 D1 08 00] [00 00 00 00]
        mplew.writeShort(SendPacketOpcode.REMOVE_ITEM_FROM_MAP.getValue());
        mplew.write(animation); //0 - 渐隐 1 - 立刻消失 4 - 金钱炸效果 5 - 宠物捡起来
        mplew.writeInt(oid);
        if (animation >= 2) {
            mplew.writeInt(cid);
            if (pet) {
                mplew.writeInt(slot); //093修改 以前是byte
            }
        }

        return mplew.getPacket();
    }

    public static MaplePacket updateCharLook(MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.UPDATE_CHAR_LOOK.getValue());
        mplew.writeInt(chr.getId());
        mplew.write(1);
        addCharLook(mplew, chr, false);
        addRings2(mplew, chr, true);//戒指效果函数
        return mplew.getPacket();
    }

    //显示龙龙的SP

    public static MaplePacket changeJob(byte mode) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CHANGE_JOB.getValue());
        mplew.write(mode);
        mplew.write(28);
        return mplew.getPacket();
   }

   //召唤龙龙
    public static MaplePacket spawnDragon(MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //E3 00 [1F 0C 74 00] [7C 00 00 00] [91 05 00 00] [04] [00 00] [A7 08]
        mplew.writeShort(SendPacketOpcode.DRAGON_SPAWN.getValue());
        mplew.writeInt(chr.getId());
        mplew.writeInt(chr.getPosition().x);
        mplew.writeInt(chr.getPosition().y);
        mplew.writeShort(0);
        mplew.write(0);
        mplew.writeShort((short)chr.getJob().getId());
        return mplew.getPacket();
    }

    public static MaplePacket 龙神信息(String path) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(11);
        mplew.writeMapleAsciiString(path);
        return mplew.getPacket();
    }

    public static MaplePacket evanTutorial(String path,int cid) {
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
     mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
     mplew.write(4);
     mplew.writeInt(cid);
     mplew.write(1);
     mplew.write(1);
     mplew.write(1);
     mplew.writeMapleAsciiString(path);
     return mplew.getPacket();
   }

   public static MaplePacket evanTutorial(String path) {
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
     mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
     mplew.write(4);
     mplew.writeInt(0);
     mplew.write(1);
     mplew.write(1);
     mplew.write(1);
     mplew.writeMapleAsciiString(path);
     return mplew.getPacket();
   }

  public static MaplePacket updateSp(int Sp) {
      if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendPacketOpcode.UPDATE_SKILLS.getValue());
    mplew.writeShort(0);
    mplew.write(0);
    mplew.write(Sp);
    return mplew.getPacket();
  }

   public static MaplePacket getShowSpGain(MapleCharacter chr, int gain) {
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
    mplew.write(4);
    mplew.writeShort(chr.getJob().getId());
    mplew.write(gain);
    return mplew.getPacket();
  }

    //丢下道具的ok
    public static MaplePacket dropInventoryItem(MapleInventoryType type, short src) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        // mplew.writeShort(0x19);
        mplew.write(HexTool.getByteArrayFromHexString("01 01 03"));
        mplew.write(type.getType());
        mplew.writeShort(src);
        if (src < 0) {
            mplew.write(1);
        }
        return mplew.getPacket();
    }

    //更新掉落装备
    public static MaplePacket dropInventoryItemUpdate(MapleInventoryType type, IItem item) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("01 01 01"));
        mplew.write(type.getType());
        mplew.writeShort(item.getPosition());
        mplew.writeShort(item.getQuantity());

        return mplew.getPacket();
    }

    //玩家的伤害
    public static MaplePacket damagePlayer(int skill, int monsteridfrom, int cid, int damage, int fake, int direction, boolean pgmr, int pgmr_1, boolean is_pg, int oid, int pos_x, int pos_y) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // D9 00 [60 B5 6C 00] FF [01 00 00 00]      [05 87 01 00] 01 00 00 01 00 00 00
        // F5 00 [9F 1E 44 00] FF [30 04 00 00] [00] [17 7C 92 00] [00 00 00 00] [30 04 00 00]
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.DAMAGE_PLAYER.getValue());
        mplew.writeInt(cid);
        mplew.write(skill);
        mplew.writeInt(damage);
        mplew.write(0); //093新增
        if ((skill != -4) && (skill != -3)) {
          mplew.writeInt(monsteridfrom);
          if (pgmr) {
            mplew.write(0);
            mplew.write(pgmr_1);
            mplew.write(0);
            mplew.write((is_pg) ? 1 : 0);
            mplew.writeInt(oid);
            mplew.write(7);
            mplew.writeShort(pos_x);
            mplew.writeShort(pos_y);
            mplew.write(0);
          } else {
            mplew.writeInt(direction);
          }
        }
        mplew.writeInt(damage);
        if (fake > 0){
          mplew.writeInt(fake);
        }
        return mplew.getPacket();
    }

    public static MaplePacket showBoatEffect(int effect) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.BOAT_EFFECT.getValue());
        mplew.writeShort(effect); //1034: balrog boat comes, 1548: boat comes in ellinia station, 520: boat leaves ellinia station

        return mplew.getPacket();
    }

    //检查人物名反馈
    public static MaplePacket charNameResponse(String charname, boolean nameUsed) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CHAR_NAME_RESPONSE.getValue());
        mplew.writeMapleAsciiString(charname);
        mplew.write(nameUsed ? 1 : 0);

        return mplew.getPacket();
    }

    //增加新人物089这里没出错
    public static MaplePacket addNewCharEntry(MapleCharacter chr, boolean worked) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.ADD_NEW_CHAR_ENTRY.getValue());
        mplew.write(worked ? 0 : 1);
        addCharEntry(mplew, chr);
        return mplew.getPacket();
    }

    /**
     *开始任务
     */
    public static MaplePacket startQuest(MapleCharacter c, short quest) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(1);
        mplew.writeShort(quest);
        mplew.writeShort(1);
        mplew.write(0);

        return mplew.getPacket();
    }


    //角色信息
    public static MaplePacket charInfo(MapleCharacter chr) {
        /*
3F 00
79 1F 47 00 //人物ID
7A //人物等级
B8 0D //职业ID
0A //pk等级
00 00 00 00  //人气度
00 //是否结婚
00 //093新增
01 00 2D //家族名 显示的内容是"-"
00 00 //联盟名 无内容
FF

00 //宠物结束
00 //无坐骑
00 //购物车size
00 //093
E5 6D 11 00 //正在佩戴的勋章的ID
04 00 //总勋章数
F5 74 //获得勋章的任务
F6 74 //获得勋章的任务
F7 74 //获得勋章的任务
F8 74 //获得勋章的任务

00 00 00 00 00 00 //6个byte应该是对应倾向的图像

00 00 00 00 //椅子size
03 00 00 00 //勋章size
E4 6D 11 00 //勋章列表的勋章itemid
E2 6D 11 00 //勋章列表的勋章itemid
E3 6D 11 00 //勋章列表的勋章itemid
         */
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CHAR_INFO.getValue());
        mplew.writeInt(chr.getId());
        mplew.write(chr.getLevel());
        mplew.writeShort(chr.getJob().getId());
        mplew.write(chr.getPkLevel());//093新增 Pk等级(1 - 10)
        mplew.writeInt(chr.getFame());//人气 从092的 Short --> Int
        mplew.write(chr.isMarried() ? 1 : 0);
        mplew.write(0); //093新增
        String guildName = "-";
        String allianceName = "";
        MapleGuildSummary gs = chr.getClient().getChannelServer().getGuildSummary(chr.getGuildId());
        if (chr.getGuildId() > 0 && gs != null) {
            guildName = gs.getName();
            try {
                MapleAlliance alliance = chr.getClient().getChannelServer().getWorldInterface().getAlliance(gs.getAllianceId());
                if (alliance != null)
                    allianceName = alliance.getName();
            } catch (RemoteException re) {
                chr.getClient().getChannelServer().reconnectWorld();
            }
        }
        mplew.writeMapleAsciiString(guildName);//家族 [01 00 2D]
        mplew.writeMapleAsciiString(allianceName);//联盟 [00 00]
        mplew.write(-1);//093
        //宠物
        List<MaplePet> pets = chr.getPets();
        for (MaplePet pet : pets) {
            mplew.write(HexTool.getByteArrayFromHexString("01 01"));
            mplew.writeInt(0);
            mplew.writeInt(pet.getItemId()); //宠物ID
            mplew.writeMapleAsciiString(pet.getName());//宠物名
            mplew.write(pet.getLevel()); //等级
            mplew.writeShort(pet.getCloseness()); //亲密度
            mplew.write(pet.getFullness()); //饥饿度
            //mplew.write(HexTool.getByteArrayFromHexString("4E 37"));
            mplew.write(HexTool.getByteArrayFromHexString("00 00"));
            if (chr.getInventory(MapleInventoryType.EQUIPPED).getItem((byte) -114) != null) {
                mplew.writeInt(chr.getInventory(MapleInventoryType.EQUIPPED).getItem((byte) -114).getItemId());
            } else {
                mplew.writeInt(0);
            }
        }
        if(pets.isEmpty())
            mplew.write(0);
        mplew.write(0);
        //坐骑
        if (chr.getMount() != null
                && chr.getInventory(MapleInventoryType.EQUIPPED).getItem((byte) -18) != null //是否有骑宠
                && chr.getInventory(MapleInventoryType.EQUIPPED).getItem((byte) -19) != null //是否有鞍子
                && chr.getInventory(MapleInventoryType.EQUIPPED).getItem((byte) -18).getItemId() == chr.getMount().getItemId()) {
            mplew.write(chr.getMount().getId()); //mount
            mplew.writeInt(chr.getMount().getLevel()); //level
            mplew.writeInt(chr.getMount().getExp()); //exp
            mplew.writeInt(chr.getMount().getTiredness()); //tiredness
        } else {
            mplew.write(0); //无坐骑
        }
        //购物车
        try {
            Connection con = DatabaseConnection.getConnection();
            PreparedStatement ps = con.prepareStatement("SELECT * FROM wishlist WHERE charid = ?");
            ps.setInt(1, chr.getId());
            ResultSet rs = ps.executeQuery();
            int i = 0;
            while (rs.next()) {
                i++;
            }
            mplew.write(i); //购物车size
            rs.close();
            ps.close();
        } catch (SQLException e) {
            log.info("Error getting wishlist data:", e);
        }
        try {
            Connection con = DatabaseConnection.getConnection();
            PreparedStatement ps = con.prepareStatement("SELECT * FROM wishlist WHERE charid = ? ORDER BY sn DESC");
            ps.setInt(1, chr.getId());
            ResultSet rs = ps.executeQuery();
            while (rs.next()) {
                mplew.writeInt(rs.getInt("sn"));
            }
            rs.close();
            ps.close();

        } catch (SQLException e) {
            log.info("Error getting wishlist data:", e);
        }
          mplew.writeInt(0); //正在佩戴的勋章itemid
          mplew.writeShort(0);//size 共完成了多少个勋章任务
          //mplew.writeShort(x);//questid 对应上面的size 发送的是勋章任务的id 去QuestInf.img.xml里找
          mplew.write(0); //领袖气质
          mplew.write(0); //洞察力
          mplew.write(0); //意志
          mplew.write(0); //手技
          mplew.write(0); //感性
          mplew.write(0); //魅力
          MapleInventory iv = chr.getInventory(MapleInventoryType.SETUP);
          MapleInventory iv2 = chr.getInventory(MapleInventoryType.EQUIP);
          List<Item> chairItems = new ArrayList();
          for (IItem item : iv.list()) {
              if (item.getItemId() >= 3010000 && item.getItemId() <= 3020001) {
                  chairItems.add((Item) item);
              }
          }
          List<Item> medalItems = new ArrayList();
          for (IItem item : iv2.list()) {
              if (item.getItemId() >= 1142000 && item.getItemId() < 1152000) {
                  medalItems.add((Item) item);
              }
          }
          //椅子列表
          mplew.writeInt(chairItems.size());
          for (IItem item : chairItems ) {
              mplew.writeInt(item.getItemId());
          }
          //勋章列表
          mplew.writeInt(medalItems.size());
          for (IItem item : medalItems ) {
              mplew.writeInt(item.getItemId());
          }
          //System.out.println("BOX包："+mplew.getPacket());
          return mplew.getPacket();
    }

    /**
    丢弃任务
     */
    public static MaplePacket forfeitQuest(MapleCharacter c, short quest) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(1);
        mplew.writeShort(quest);
        mplew.writeShort(0);
        mplew.write(0);
        mplew.writeInt(0);
        mplew.writeInt(0);
        return mplew.getPacket();
    }

    /**
     *完成任务
     * @param c
     * @param quest
     * @return
     */
    public static MaplePacket completeQuest(MapleCharacter c, short quest) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(1);
        mplew.writeShort(quest);
        mplew.write(2);
        mplew.writeShort(0);//093++
        mplew.writeLong(DateUtil.getFileTimestamp(System.currentTimeMillis()));

        return mplew.getPacket();
    }

    /**
     *更新任务信息
     * @param c
     * @param quest
     * @param npc
     * @param progress
     * @return
     */
    public static MaplePacket updateQuestInfo(MapleCharacter c, short quest, int npc, byte progress) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // [EE 00] [0A] [F1 03] [45 2F 00 00] [00 00 00 00] //089
        // [0F 01] [0A] [00 2B] [B5 65 8A 00] [00 00 00 00] //093
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.UPDATE_QUEST_INFO.getValue());
        mplew.write(progress);
        mplew.writeShort(quest);
        mplew.writeInt(npc);
        mplew.writeInt(0);
        return mplew.getPacket();
    }

    //更新任务
    public static MaplePacket updateQuest(int quest, String status) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(1);
        mplew.writeShort(quest);
        mplew.write(1);
        mplew.writeMapleAsciiString(status);
        return mplew.getPacket();
    }

    //更新完成任务
    public static MaplePacket updateQuestFinish(short quest, int npc, short nextquest) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.UPDATE_QUEST_INFO.getValue());
        mplew.write(8);
        mplew.writeShort(quest);
        mplew.writeInt(npc);
        mplew.writeShort(nextquest);
        mplew.writeShort(0);
        return mplew.getPacket();
    }

    private static <E extends LongValueHolder> long getLongMask(List<Pair<E, Integer>> statups) {
        long mask = 0;
        for (Pair<E, Integer> statup : statups) {
            mask |= statup.getLeft().getValue();
        }
        return mask;
    }

    private static <E extends LongValueHolder> long getLongMaskFromList(List<E> statups) {
        long mask = 0;
        for (E statup : statups) {
            mask |= statup.getValue();
        }
        return mask;
    }

    //long mask在long 0前面
    /*
    private static boolean OneBuff(List<MapleBuffStat> statups) {
    for (MapleBuffStat stat : statups) {
      if (stat.isOne()) {
         return true;
      }
    }
    return false;
  }
    */

    //疾驰 龙卷风
    public static MaplePacket giveDashOrTornado(List<Pair<MapleBuffStat, Integer>> statups, int skillid, int duration) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        /*
25 00
00 00 00 06 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00
1E 00 00 00
2D 4F 4C 00
00 00 00 00
00
14 00

14 00 00 00
2D 4F 4C 00
01 01 00 00
00
14 00

00 00
03
         */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
        Mask093(mplew, statups); //093修改
        mplew.write(new byte[3]); //093新增
        for (Pair<MapleBuffStat, Integer> stat : statups) {
            mplew.writeInt(stat.getRight().intValue());
            mplew.writeInt(skillid);
            mplew.writeInt(0);
            mplew.write(0);
            mplew.writeShort(duration);
        }
        mplew.writeShort(0);
        mplew.write(3);
        //log.info("疾驰/龙卷风技能封包:"+mplew.getPacket());
        return mplew.getPacket();
    }

    //变身技能
    public static MaplePacket giveSkillBianShen(MapleCharacter c, int skillid, int skilllength, List<Pair<MapleBuffStat, Integer>> statups) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
        //mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00 00 00 00 E0 02 00 00 00 80 01 00 00"));
        Mask093(mplew, statups);
        for (Pair statup : statups) {
            //mplew.writeShort(((Integer)statup.getRight()).shortValue() + (c.getGender() * 100));
            mplew.writeShort(((Integer)statup.getRight()).shortValue());
            mplew.writeInt(skillid);//技能ID
            mplew.writeInt(skilllength);//持续时间
        }
        mplew.writeShort(0);
        mplew.writeShort(0);
        mplew.write(0); //093新增
        mplew.write(7);
        return mplew.getPacket();
    }

    public static MaplePacket giveMonsterRidingBuff(MapleCharacter c, int itemid, int skillid, List<Pair<MapleBuffStat, Integer>> statups, int bufftime) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());

        mplew.writeLong(MapleBuffStat.骑宠1.getValue());
        mplew.writeLong(MapleBuffStat.骑宠2.getValue());
        mplew.writeLong(0);
        mplew.writeLong(0);

        //基本结构 Short Int Int Byte
        //1
        mplew.writeShort(0);
        mplew.writeInt(skillid); //骑宠的itemid
        mplew.writeInt(bufftime);//持续时间
        mplew.write(0);
        //2
        mplew.writeShort(0);
        mplew.writeInt(itemid); //骑宠的itemid
        mplew.writeInt(skillid);//skillid
        mplew.write(0);

        mplew.writeInt(0);
        mplew.writeShort(0);
        mplew.write(3);
        /*
        System.out.println("1.骑宠技能!");
        System.out.println("1.骑宠的itemid: "+itemid);
        System.out.println("1.skillid: "+skillid);
        log.info("骑宠封包:"+mplew.getPacket());
        */
        return mplew.getPacket();
    }

    public static MaplePacket giveArmorBuff(MapleCharacter c, int bufflength, List<Pair<MapleBuffStat, Integer>> statups, int watk) {

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        int b = 0;
        mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
        Mask093(mplew, statups);
        for (Pair statup : statups) {
            //b = ((Integer)statup.getRight()).shortValue() + (c.getGender() * 100);
            b = ((Integer)statup.getRight()).shortValue();
            mplew.writeShort(b); //防御的次数
            mplew.writeInt(1220013);//技能ID
            mplew.writeInt(bufflength);//持续时间
            System.out.println("2.Left的值: "+(((MapleBuffStat)statup.getLeft()).getValue()));
            System.out.println("2.Right的值: "+((Integer)statup.getRight()).shortValue());
            System.out.println("2.增加的攻击力: "+watk);
            System.out.println("2.技能ID: "+1220013);
            System.out.println("2.持续时间: "+bufflength / 1000+"秒");
            break;
        }
        mplew.writeShort(0);
        mplew.write(0); //新增
        mplew.writeShort(watk);//增加攻击力
        mplew.writeInt(0);//比别的buff多了一个int
        log.info("祝福护甲技能封包:"+mplew.getPacket());
        return mplew.getPacket();
    }

    public static MaplePacket giveBuff(MapleCharacter c, int buffid, int bufflength, List<Pair<MapleBuffStat, Integer>> statups) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
        Mask093(mplew, statups);
        for (Pair statup : statups) {
            short a = ((Integer)statup.getRight()).shortValue();
            //mplew.writeShort(a == 1002 ? 1002 : a + c.getGender() * 100);
            mplew.writeShort(a == 1002 ? 1002 : a);
            //橡木伪装的Right == 1002
            mplew.writeInt(buffid);//技能ID
            mplew.writeInt(bufflength);//持续时间
            /*
            System.out.println("2.Left的值: "+(((MapleBuffStat)statup.getLeft()).getValue()));
            System.out.println("2.Right的值: "+((Integer)statup.getRight()).shortValue());
            System.out.println("2.技能ID: "+buffid);
            System.out.println("2.持续时间: "+bufflength / 1000+"秒");
            */
        }
        mplew.writeShort(0);
        if(buffid == 33101006) mplew.write(19);
        mplew.writeShort(0);//范围 组队技能
        mplew.write(0);//093新增
        //有些技能最后多一个包
        int a = giveBuff(c, buffid);
        if(a > 0) {
            mplew.write(a);
            //System.out.println("giveBuff在之后发了一个字节的a包 a的值："+a);
        }
        //log.info("普通技能封包:"+mplew.getPacket());
        return mplew.getPacket();
    }

    /*
    //092
    private static void OneOrTwoMask(MaplePacketLittleEndianWriter mplew, List<Pair<MapleBuffStat, Integer>> statups) {
        long one = 0;
        long two = 0;
        for (Pair statup : statups) {
            if (((MapleBuffStat)statup.getLeft()).isOne())
                one |= ((MapleBuffStat)statup.getLeft()).getValue();
            else {
                two |= ((MapleBuffStat)statup.getLeft()).getValue();
            }
        }
        if(one > 0 && two > 0)
            System.out.println("先后mask兼有");
        else if(one > 0)
            System.out.println("先mask");
        else
            System.out.println("后mask");
        mplew.writeInt(0);
        mplew.writeLong(one);
        mplew.writeLong(two);
    }
    */

    private static void Mask093(MaplePacketLittleEndianWriter mplew, List<Pair<MapleBuffStat, Integer>> statups) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        long one = 0;
        long two = 0;
        long three = 0;
        long four = 0;
        for (Pair<MapleBuffStat, Integer> statup : statups) {
            if (statup.getLeft().getMaskPos() == 1) {
                one |= statup.getLeft().getValue();
                //System.out.println("mask1：");
            } else if (statup.getLeft().getMaskPos() == 2) {
                two |= statup.getLeft().getValue();
                //System.out.println("mask2");
            } else if (statup.getLeft().getMaskPos() == 3) {
                three |= statup.getLeft().getValue();
                //System.out.println("mask3");
            } else if (statup.getLeft().getMaskPos() == 4) {
                four |= statup.getLeft().getValue();
                //System.out.println("mask4");
            }
        }
        mplew.writeLong(one);
        mplew.writeLong(two);
        mplew.writeLong(three);
        mplew.writeLong(four);
    }


    public static int giveBuff(MapleCharacter c, int buffid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        int a = 0;
        switch(buffid) {
            case 勇士.冒险岛勇士:
            case 骑士.冒险岛勇士:
            case 龙骑.冒险岛勇士:
            case 火毒.冒险岛勇士:
            case 冰雷.冒险岛勇士:
            case 牧师.冒险岛勇士:
            case 弓手.冒险岛勇士:
            case 弩手.冒险岛勇士:
            case 标飞.冒险岛勇士:
            case 刀飞.冒险岛勇士:
            case 拳手.冒险岛勇士:
            case 枪手.冒险岛勇士:
            case 战神.冒险岛勇士:
            case 双刀.冒险岛勇士:
            case 龙神.冒险岛勇士:
            case 战法.冒险岛勇士:
            case 弩骑.冒险岛勇士:
            case 机械师.冒险岛勇士:
            case 新手.疾风步:
            case 初心者.疾风步:
            case 战神.疾风步:
            case 龙神.疾风步:
            case 管理员.上乘轻功:
            case 夜行者.轻功:
            case 8000:
            case 10008000:
            case 20008000:
            case 20018000:
            case 30008000:
            case 标飞.轻功:
            case 刀飞.轻功:
            case 拳手.橡木伪装:
            case 双刀.暗影轻功:
            case 风灵使者.风影漫步:
                a = 5;
                break;
            case 战法.黄色灵气: //黄色灵气
            case 战法.进阶黄色灵气:
                a = 0x1F;
                break;
            case 弩骑.暴走形态: //暴走状态
            case -2022458: //神兽的祝福
                a = 6;
                break;
            case 拳手.超人变形: //超人变形
            case 拳手.超级变身: //超级变身
            case 风灵使者.信天翁:// 风灵使者 - 信天翁
            case 奇袭者.超人变形:// 奇袭者 - 超级变身
                a = 7;
                break;
            case 战神.冰雪矛:
                a = 2;
                break;
        }
        return a;
    }

    public static MaplePacket giveGmHide(boolean hidden) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GM.getValue());
        mplew.write(16);
        mplew.write(hidden ? 1 : 0);
        return mplew.getPacket();
    }

    //骑宠buff
    public static MaplePacket showMonsterRiding(MapleCharacter chr, List<Pair<MapleBuffStat, Integer>> statups, int itemId, int skillId, int bufftime) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //C9 00 1D CE 4A 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 B0 05 1D 00 EC 03 00 00 00 00 00 00 00 00 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
        mplew.writeInt(chr.getId());
        mplew.writeLong(MapleBuffStat.骑宠1.getValue());
        mplew.writeLong(MapleBuffStat.骑宠2.getValue());
        mplew.writeLong(0);
        mplew.writeLong(0);

        //基本结构 Short Int Int Byte
        //1
        //mplew.writeShort(chr.getGender() * 100);
        mplew.writeShort(0);
        mplew.writeInt(skillId); //骑宠的itemid
        mplew.writeInt(bufftime);//持续时间
        mplew.write(0);
        //2
        mplew.writeShort(0);
        mplew.writeInt(itemId); //骑宠的itemid
        mplew.writeInt(skillId);//skillid
        mplew.write(0);

        mplew.writeInt(0);
        mplew.writeShort(0);
        mplew.write(3);
        System.out.println("1.骑宠技能!");
        System.out.println("1.骑宠的itemid: "+itemId);
        System.out.println("1.skillid: "+skillId);
        log.info("骑宠封包:"+mplew.getPacket());
        return mplew.getPacket();
    }

    public static MaplePacket showDashEffecttoOthers(int cid, List<Pair<MapleBuffStat, Integer>> statups, int duration) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
        mplew.writeInt(cid);
        mplew.writeLong(0);
        mplew.writeLong(MapleBuffStat.疾驰_龙卷风.getValue());
        mplew.writeShort(0);
        for (Pair<MapleBuffStat, Integer> stat : statups) {
            mplew.writeInt(stat.getRight().shortValue());
            mplew.writeInt(5001005);
            mplew.write(HexTool.getByteArrayFromHexString("1A 7C 8D 35"));
            mplew.writeShort(duration);
        }
        mplew.writeShort(0);
        return mplew.getPacket();
    }

    public static MaplePacket giveForeignBuff(MapleCharacter c, List<Pair<MapleBuffStat, Integer>> statups, MapleStatEffect effect) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        // [C5 00] [12 01 2B 00] [00 00 00 00 00 00 00 00] [00 00 00 00 80 00 00 00] [0A 00] [00 00] [00] //077
        // [C5 00] [1F 01 2B 00] [00 00 00 00 00 00 00 00] [00 00 00 00 80 00 00 00] [0A 00] [00 00] [00]
        // [C9 00] [1D CE 4A 00] [00 00 00 00 00 00 00 00] [02 00 00 00 80 00 00 00] [28 E8] [03 00] [00 00] [00]
        mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
        mplew.writeInt(c.getId());
        Mask093(mplew, statups);
        for (Pair statup : statups) {
            short a = ((Integer)statup.getRight()).shortValue();
            //mplew.writeShort(a == 1002 ? 1002 : a + c.getGender() * 100); 会无法显示斗气
            mplew.writeShort(a == 1002 ? 1002 : a);
            //橡木伪装的Right == 1002
            //System.out.println("2.Left的值: "+(((MapleBuffStat)statup.getLeft()).getValue()));
            //System.out.println("2.Right的值: "+((Integer)statup.getRight()).shortValue());
            mplew.writeInt(effect.getSourceId());//技能ID
            //System.out.println("2.技能ID: "+buffid);
            mplew.writeInt(effect.getDuration());//持续时间
            //System.out.println("2.持续时间: "+bufflength/1000+"秒");
        }
        mplew.writeShort(0);
        mplew.write(0); //093新增
        mplew.writeShort(0);//范围 组队技能
        //有些技能最后多一个包
        int a = giveBuff(c, effect.getSourceId());
        if(a > 0)
            mplew.write(a);
        //log.info("普通技能封包:"+mplew.getPacket());
        return mplew.getPacket();
    }

    //减益buff,怪给角色
    public static MaplePacket giveDebuff(long mask, List<Pair<MapleDisease, Integer>> statups, MobSkill skill) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        /*24 00
         * 00 00 00 00
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 00 00 40
         * 01 00
         * 7A 00
         * 05 00
         * 5E 7E 00 00
         * 00 00
         * 2E 09
         * 05 虚弱[不能跳跃]

         */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
        //093 有4个mask
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(mask);
        for (Pair<MapleDisease, Integer> statup : statups) {
            mplew.writeShort(statup.getRight().shortValue());
            mplew.writeShort(skill.getSkillId());//技能ID
            mplew.writeShort(skill.getSkillLevel());//技能等级
            mplew.writeInt((int) skill.getDuration());//持续时间
        }
        mplew.writeShort(0); // ??? wk charges have 600 here o.o
        mplew.writeShort(900);
        mplew.write(3);//093修改
        return mplew.getPacket();
    }

    public static MaplePacket testPacket(String test) {
        //A4 00 02 F1 F8 4D 00 0A
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.write(HexTool.getByteArrayFromHexString(test));

        return mplew.getPacket();
    }

    public static MaplePacket giveForeignDebuff(int cid, long mask, List<Pair<MapleDisease, Integer>> statups, MobSkill skill) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
        mplew.writeInt(cid);
        //093 有4个mask
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(mask);
        for (Pair<MapleDisease, Integer> statup : statups) {
            mplew.writeShort(statup.getRight().shortValue());
            mplew.writeShort(skill.getSkillId());//技能ID
            mplew.writeShort(skill.getSkillLevel());//技能等级
            mplew.writeInt((int) skill.getDuration());//持续时间
        }
        mplew.writeShort(0); // ??? wk charges have 600 here o.o
        mplew.writeShort(900);
        mplew.write(3);//093修改
        return mplew.getPacket();
    }

    public static MaplePacket cancelForeignDebuff(int cid, long mask) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CANCEL_FOREIGN_BUFF.getValue());
        mplew.writeInt(cid);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(mask);

        return mplew.getPacket();
    }

    //取消第二人看见的状态
    public static MaplePacket cancelForeignBuff(int cid, List<MapleBuffStat> statups, MapleCharacter chr, int skillid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
      MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
      mplew.writeShort(SendPacketOpcode.CANCEL_FOREIGN_BUFF.getValue());
      mplew.writeInt(chr.getId());
        MapleStatEffect ret = new MapleStatEffect();
        ret.setSourceId(skillid);
        if (skillid == 弩骑.吞噬) //吞噬 由于吞噬技能没有givebuff就发了cancelbuff 没法获取Mask所以要直接发包
            mplew.write(HexTool.getByteArrayFromHexString(""
                    + "00 00 00 00 00 00 00 00 "
                    + "00 00 00 00 00 00 00 00 "
                    + "F0 00 00 00 00 00 00 01 "
                    + "00 00 00 00 00 00 00 00"));
        else if((skillid >= 2022125 || skillid <= 2022129) && statups == null) { //灵魂助力
            cancelSpecialBuff(statups, skillid);
            return mplew.getPacket();
        } else if (ret.isMonsterRiding()) {
            //System.out.println("取消骑宠");
            mplew.writeLong(MapleBuffStat.骑宠1.getValue());
            mplew.writeLong(MapleBuffStat.骑宠2.getValue());
            mplew.writeLong(0);
            mplew.writeLong(0);
            mplew.write(6);
            mplew.write(1);
        } else {
            Mask093_2(mplew, statups, skillid);
        }
        int a = cancelBuff(skillid);
        if(a > 0) {
            mplew.write(a);
            //System.out.println("cancelBuff在之后发了一个字节的a包 a的值："+a);
        }
        //System.out.println("总cancelBuff 技能包："+mplew.getPacket());
        return mplew.getPacket();
  }
    /*
    private static void OneOrTwoMask2(MaplePacketLittleEndianWriter mplew, List<MapleBuffStat> stats, int skillid) {
        long one = 0;
        long two = 0;
        for (MapleBuffStat statup : stats)
            if (statup.isOne())
                one |= statup.getValue();
            else
                two |= statup.getValue();

        if(one > 0 && two > 0)
            System.out.println("先后mask兼有的技能");
        else if(one > 0)
            System.out.println("纯粹先mask的技能");
        else
            System.out.println("纯粹后mask的技能");
        mplew.writeInt(0);
        mplew.writeLong(changeMask(one, skillid));
        mplew.writeLong(two);
    }
    */

    private static void Mask093_2(MaplePacketLittleEndianWriter mplew, List<MapleBuffStat> stats, int skillid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        long one = 0;
        long two = 0;
        long three = 0;
        long four = 0;
        for (MapleBuffStat statup : stats) {
            if (statup.getMaskPos() == 1) {
                one |= statup.getValue();
                //System.out.println("mask1");
            } else if (statup.getMaskPos() == 2) {
                two |= statup.getValue();
                //System.out.println("mask2");
            } else if (statup.getMaskPos() == 3) {
                three |= statup.getValue();
                //System.out.println("mask3");
            } else if (statup.getMaskPos() == 4) {
                four |= statup.getValue();
                //System.out.println("mask4");
            }
        }
        mplew.writeLong(one);
        mplew.writeLong(two);
        mplew.writeLong(changeMask(three, skillid));
        mplew.writeLong(four);
    }

    public static void cancelSpecialBuff(List<MapleBuffStat> statups, int skillid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
     if(skillid == 2022125 && statups == null)
         mplew.write(HexTool.getByteArrayFromHexString(""
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 40 "
                 + "00 00 00 00 00 00 00 00"));
     else if(skillid == 2022126 && statups == null)
         mplew.write(HexTool.getByteArrayFromHexString(""
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 80 "
                 + "00 00 00 00 00 00 00 00"));
     else if(skillid == 2022127 && statups == null)
         mplew.write(HexTool.getByteArrayFromHexString(""
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 10 00 00 00"));
     else if(skillid == 2022128 && statups == null)
         mplew.write(HexTool.getByteArrayFromHexString(""
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 20 00 00 00"));
     else if(skillid == 2022129 && statups == null)
         mplew.write(HexTool.getByteArrayFromHexString(""
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 10 "
                 + "00 00 00 00 00 00 00 00"));
    }

    //取消BUFF
    public static MaplePacket cancelBuff(List<MapleBuffStat> statups, MapleCharacter chr ,int skillid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //System.out.println("cancelBuff的skillid："+skillid);
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        MapleStatEffect ret = new MapleStatEffect();
        ret.setSourceId(skillid);
        mplew.writeShort(SendPacketOpcode.CANCEL_BUFF.getValue());
        if (skillid == 弩骑.吞噬) //吞噬 由于吞噬技能没有givebuff就发了cancelbuff 没法获取Mask所以要直接发包
            mplew.write(HexTool.getByteArrayFromHexString(""
                    + "00 00 00 00 00 00 00 00 "
                    + "00 00 00 00 00 00 00 00 "
                    + "F0 00 00 00 00 00 00 01 "
                    + "00 00 00 00 00 00 00 00"));
        else if((skillid >= 2022125 || skillid <= 2022129) && statups == null) { //灵魂助力
            cancelSpecialBuff(statups, skillid);
            return mplew.getPacket();
        } else if (ret.isMonsterRiding()) {
            //System.out.println("取消骑宠");
            mplew.writeLong(MapleBuffStat.骑宠1.getValue());
            mplew.writeLong(MapleBuffStat.骑宠2.getValue());
            mplew.writeLong(0);
            mplew.writeLong(0);
            mplew.write(6);
            mplew.write(1);
        } else {
            Mask093_2(mplew, statups, skillid);
        }
        int a = cancelBuff(skillid);
        if(a > 0) {
            mplew.write(a);
            //System.out.println("cancelBuff在之后发了一个字节的a包 a的值："+a);
        }
        //System.out.println("总cancelBuff 技能包："+mplew.getPacket());
        return mplew.getPacket();
  }

    public static long changeMask(long mask, int skillid) {
        if(mask == 0x1000L && (skillid == 战法.黑暗灵气 || skillid == 战法.进阶黑暗灵气)) {
            mask += 0x2000L;
        } else if(mask == 0x1000L && (skillid == 战法.蓝色灵气 || skillid == 战法.进阶蓝色灵气)) {
            mask += 0x4000L;
        } else if(mask == 0x1000L && (skillid == 战法.黄色灵气 || skillid == 战法.进阶黄色灵气) ) {
            mask += 0x8000L;
        }
        return mask;
    }

    /*
    //取消BUFF
    public static MaplePacket cancelBuff(List<MapleBuffStat> statups, MapleCharacter chr ,int skillid) {
        System.out.println("cancelBuff的skillid："+skillid);
      MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
      mplew.writeShort(SendPacketOpcode.CANCEL_BUFF.getValue());
      long mask = 0;
      if(statups != null)
          mask = getLongMaskFromList(statups);
      long mask2 = 42949672960L; //金属机甲 原型
      if (skillid == 33121006) //暴走状态 由于这个mask是先后mask混杂 所以无法判断 要单独发包
          mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 02 00 00 00 00 02 00 00 00 00 80 00 00 00"));
      else if (skillid == 33101005) //吞噬 由于吞噬技能没有givebuff就发了cancelbuff 没法获取Mask所以要直接发包
          mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 F0 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00"));
      else if(skillid == 5111005 || skillid == 5121003 || skillid == 13111005 || skillid == 15111002) //变身技能的包 先后mask混杂
          mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00 00 00 00 E0 02 00 00 00 80 01 00 00"));
      else if(skillid == 2022125 && statups == null)
          mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00"));
      else if(skillid == 2022126 && statups == null)
          mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00"));
      else if(skillid == 2022127 && statups == null)
          mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00"));
      else if(skillid == 2022128 && statups == null)
          mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00"));
      else if(skillid == 2022129 && statups == null)
          mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 00"));

      else if (!(OneBuff(statups))) { //long mask 在long 0 之后的
          //if (mask == MapleBuffStat.骑宠.getValue() || mask == mask2) {
        MapleStatEffect ret = new MapleStatEffect();//定义角色效果ret
        ret.setSourceId(skillid);
        if (ret.isMonsterRiding()) {
          System.out.println("取消骑宠");
          mplew.writeLong(MapleBuffStat.骑宠.getValue());
          mplew.write(HexTool.getByteArrayFromHexString("00 00 00 F8 00 00 00 00"));
          mplew.writeInt(0);
        } else if (mask == MapleBuffStat.疾驰_龙卷风.getValue()){
          mplew.writeLong(mask);
          mplew.writeLong(0);
          mplew.writeInt(0);
        } else {
          mplew.writeInt(0);
          mplew.writeLong(0);
          mplew.writeLong(mask);
        }
          System.out.println("后mask："+mask);
     } else { //先mask技能
       mplew.writeInt(0);
       mask = changeMask(mask, chr, skillid);
       mplew.writeLong(mask);
       mplew.writeLong(0);
       System.out.println("先Mask"+mask);
      }
      int a = 0;
      if(statups != null)
          a = cancelBuff(mask, statups, skillid);
      if(a > 0) {
          mplew.write(a);
          System.out.println("cancelBuff在之后发了一个字节的a包 a的值："+a);
      }
      System.out.println("总cancelBuff 技能包："+mplew.getPacket());
      return mplew.getPacket();
  }
    */

    /*
    public static long changeMask(long mask, MapleCharacter chr, int skillid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        if(mask == 0x1000L && skillid == 32001003) {
            mask += 0x2000L;
        } else if(mask == 0x1000L && skillid == 32101002) {
            mask += 0x4000L;
        } else if(mask == 0x1000L && skillid == 32101003) {
            mask += 0x8000L;
        }
        return mask;
    }
    */

    public static int cancelBuff(int skillid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        int a = 0;
        switch(skillid) {
                case 预备兵.潜入: //潜入
                    a = 0x11;
                    break;
                case 战法.黄色灵气: //黄色灵气
                case 战法.进阶黄色灵气:
                    a = 0x26;
                    break;
                case 拳手.超人变形: //超人变形
                case 拳手.超级变身: //超级变身
                case 风灵使者.信天翁:// 风灵使者 - 信天翁
                case 奇袭者.超人变形:// 奇袭者 - 超人变形
                    a = 9;
                    break;
                case 弩骑.暴走形态: //暴走形态
                    a = 8;
                    break;
                case 双刀.龙卷风: //龙卷风
                case 海盗.疾驰: //疾驰
                case 勇士.冒险岛勇士:
                case 骑士.冒险岛勇士:
                case 龙骑.冒险岛勇士:
                case 火毒.冒险岛勇士:
                case 冰雷.冒险岛勇士:
                case 牧师.冒险岛勇士:
                case 弓手.冒险岛勇士:
                case 弩手.冒险岛勇士:
                case 标飞.冒险岛勇士:
                case 刀飞.冒险岛勇士:
                case 拳手.冒险岛勇士:
                case 枪手.冒险岛勇士:
                case 战神.冒险岛勇士:
                case 双刀.冒险岛勇士:
                case 龙神.冒险岛勇士:
                case 战法.冒险岛勇士:
                case 弩骑.冒险岛勇士:
                case 机械师.冒险岛勇士:
                case 新手.疾风步:
                case 初心者.疾风步:
                case 战神.疾风步:
                case 龙神.疾风步:
                case 管理员.上乘轻功:
                case 夜行者.轻功:
                case 8000:
                case 10008000:
                case 20008000:
                case 20018000:
                case 30008000:
                case 标飞.轻功:
                case 刀飞.轻功:
                case 拳手.橡木伪装:
                case 双刀.暗影轻功:
                case 风灵使者.风影漫步:
                    a = 5;
                    break;
                default:
                    MapleStatEffect ret = new MapleStatEffect();
                    ret.setSourceId(skillid);
                    if (ret.isMonsterRiding())
                        a = 3;
                    break;
        }
        return a;
    }

    public static MaplePacket cancelDebuff(long mask) {
        /*25 00
         * 00 00 00 00
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 00 00 40
         * 07*/
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CANCEL_BUFF.getValue());
        //093 有4个mask
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(mask);
        mplew.write(7);
        return mplew.getPacket();
    }

    //玩家商店聊天
    public static MaplePacket getPlayerShopChat(MapleCharacter c, String chat, byte slot) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("06 08"));
        mplew.write(slot);
        mplew.writeMapleAsciiString(c.getName() + " : " + chat);
        return mplew.getPacket();
    }


    public static MaplePacket getPlayerShopChat(MapleCharacter c, String chat, boolean owner) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("06 08"));
        mplew.write(owner ? 0 : 1);
        mplew.writeMapleAsciiString(c.getName() + " : " + chat);
        return mplew.getPacket();
    }

    //玩家商店新来的访问者
    public static MaplePacket getPlayerShopNewVisitor(MapleCharacter c, int slot) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0x04);
        mplew.write(slot);
        addCharLook(mplew, c, false);
        mplew.writeMapleAsciiString(c.getName());
        return mplew.getPacket();
    }

    public static MaplePacket getPlayerShopRemoveVisitor(int slot) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0x0A);
        mplew.write(slot);
        return mplew.getPacket();
    }


    //移除玩家商店新来的访问者
    public static MaplePacket getTradePartnerAdd(MapleCharacter c) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("04 01"));
        addCharLook(mplew, c, false);
        mplew.writeMapleAsciiString(c.getName());
        mplew.write(HexTool.getByteArrayFromHexString("B2 01"));
        return mplew.getPacket();
    }

    // 交易邀请
    public static MaplePacket getTradeInvite(MapleCharacter c) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("02 03"));
        mplew.writeMapleAsciiString(c.getName());
        mplew.write(HexTool.getByteArrayFromHexString("B7 50 00 00"));
        return mplew.getPacket();
    }

    public static MaplePacket getTradeMesoSet(byte number, int meso) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0xF);
        mplew.write(number);
        mplew.writeInt(meso);
        return mplew.getPacket();
    }

    public static MaplePacket getTradeItemAdd(byte number, IItem item) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0xE);
        mplew.write(number);
        addItemInfo(mplew, item,false,false,true);
        return mplew.getPacket();
    }

    public static MaplePacket getPlayerShopItemUpdate(MaplePlayerShop shop) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0x15);
        mplew.write(shop.getItems().size());
        for (MaplePlayerShopItem item : shop.getItems()) {
            mplew.writeShort(item.getBundles());
            mplew.writeShort(item.getItem().getQuantity());
            mplew.writeInt(item.getPrice());
            addItemInfo(mplew, item.getItem(), true, true, false);
        }

        return mplew.getPacket();
    }

    /**
     *
     * @param c
     * @param shop
     * @param owner
     * @return
     */
    public static MaplePacket getPlayerShop(MapleClient c, MaplePlayerShop shop, boolean owner) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("05 04 04"));
        mplew.write(owner ? 0 : 1);
        mplew.write(0);
        addCharLook(mplew, shop.getMCOwner(), false);
        mplew.writeMapleAsciiString(shop.getMCOwner().getName());
        mplew.write(1);
        addCharLook(mplew, shop.getMCOwner(), false);
        mplew.writeMapleAsciiString(shop.getMCOwner().getName());
        mplew.write(0xFF);
        mplew.writeMapleAsciiString(shop.getDescription());
        List<MaplePlayerShopItem> items = shop.getItems();
        mplew.write(0x10);
        mplew.write(items.size());
        for (MaplePlayerShopItem item : items) {
            mplew.writeShort(item.getBundles());
            mplew.writeShort(item.getItem().getQuantity());
            mplew.writeInt(item.getPrice());
            addItemInfo(mplew, item.getItem(), true, true, false);
        }
        return mplew.getPacket();
    }

    public static MaplePacket getTradeStart(MapleClient c, MapleTrade trade, byte number) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("05 03 02"));
        mplew.write(number);
        if (number == 1) {
            mplew.write(0);
            addCharLook(mplew, trade.getPartner().getChr(), false);
            mplew.writeMapleAsciiString(trade.getPartner().getChr().getName());
            mplew.write(HexTool.getByteArrayFromHexString("B2 01"));
        }
        mplew.write(number);

        addCharLook(mplew, c.getPlayer(), false);
        mplew.writeMapleAsciiString(c.getPlayer().getName());
        mplew.write(HexTool.getByteArrayFromHexString("CB 00"));
        mplew.write(0xFF);

        return mplew.getPacket();
    }

    public static MaplePacket getTradeConfirmation() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0x10);
        return mplew.getPacket();
    }

    public static MaplePacket getTradeCompletion(byte number) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0xA);
        mplew.write(number);
        mplew.write(8);

        return mplew.getPacket();
    }

    public static MaplePacket getTradeCancel(byte number) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0xA);
        mplew.write(number);
        mplew.write(2);

        return mplew.getPacket();
    }

    public static MaplePacket removeCharBox(MapleCharacter c) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.UPDATE_CHAR_BOX.getValue());
        mplew.writeInt(c.getId());
        mplew.write(0);
        return mplew.getPacket();
    }

    public static MaplePacket getNPCTalk(int npc, byte msgType, String talk, String endBytes) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
        mplew.write(4); // ?
        mplew.writeInt(npc);//NPC代码
        mplew.write(msgType);
        mplew.write(0); // ?
        mplew.writeMapleAsciiString(talk);
        mplew.write(HexTool.getByteArrayFromHexString(endBytes));

        return mplew.getPacket();
    }

    public static MaplePacket getNPCTalk(int npc, byte msgType, String talk, String endBytes, byte speaker) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
        mplew.write(4); // ?
        mplew.writeInt(npc);
        mplew.write(msgType);
        mplew.write(speaker);
        mplew.writeMapleAsciiString(talk);
        mplew.write(HexTool.getByteArrayFromHexString(endBytes));
        return mplew.getPacket();
    }

    public static MaplePacket getNPCTalkStyle(int npc, String talk, int styles[], int card) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
        mplew.write(4); // ?
        mplew.writeInt(npc);
        mplew.writeShort(9); //type
        mplew.writeMapleAsciiString(talk);
        mplew.write(styles.length);
        for (int i = 0; i < styles.length; i++) {
            mplew.writeInt(styles[i]);
        }
        mplew.writeInt(card);
        return mplew.getPacket();
    }

    public static MaplePacket getNPCTalkNum(int npc, String talk, int def, int min, int max) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
        mplew.write(4); // ?
        mplew.writeInt(npc);
        mplew.writeShort(3);
        mplew.writeMapleAsciiString(talk);
        mplew.writeInt(def);
        mplew.writeInt(min);
        mplew.writeInt(max);

        return mplew.getPacket();
    }

    public static MaplePacket getNPCTalkText(int npc, String talk) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
        mplew.write(4); // ?
        mplew.writeInt(npc);
        mplew.writeShort(3);
        mplew.writeMapleAsciiString(talk);
        mplew.writeShort(0);
        mplew.writeInt(0);//最少

        return mplew.getPacket();
    }

    public static MaplePacket showLevelup(int cid) {
        return showForeignEffect(cid, 0);
    }

    public static MaplePacket showJobChange(int cid) {
        return showForeignEffect(cid, 11);
    }

    public static MaplePacket showForeignEffect(int cid, int effect) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_FOREIGN_EFFECT.getValue());
        mplew.writeInt(cid); // charid
        mplew.write(effect); // 0 = Level up, 8 = ?, 9 = job change, 10 = Quest Complete
        return mplew.getPacket();
    }

    public static MaplePacket showBuffeffect(int cid, int skillid, int effectid) {
        return showBuffeffect(cid, skillid, effectid, (byte) 3, false);
    }

    public static MaplePacket showBuffeffect(int cid, int skillid, int effectid, byte direction) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_FOREIGN_EFFECT.getValue());
        mplew.writeInt(cid); // ?
        mplew.write(effectid);
        mplew.writeInt(skillid);
        mplew.write(2);
        mplew.write(1);
        if (direction != (byte) 3) {
            mplew.write(direction);
        }
        //mplew.write(1); //093增加
        return mplew.getPacket();
    }

    public static MaplePacket showBuffeffect(int cid, int skillid, int effectid, byte direction, boolean morph) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_FOREIGN_EFFECT.getValue());
        mplew.writeInt(cid);
        if (morph) {
            mplew.write(1);
            mplew.writeInt(skillid);
            mplew.write(direction);
        }
        mplew.write(effectid);
        mplew.writeInt(skillid);
        mplew.write(1);
        if (direction != (byte) 3) {
            mplew.write(direction);
        }

        return mplew.getPacket();
    }


    public static MaplePacket 龙之魂光效() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //09 01 07 20 01 14 00 龙之魂
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(7);
        mplew.writeInt(1311008);
        return mplew.getPacket();
    }

    public static MaplePacket showOwnBuffEffect(int skillid, int effectid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //EE 00 02 63 C0 17 02 01 显示治疗机器人给人补血时候的特效
        //EE 00 02 F1 F8 4D 00 01 显示海盗获得能量的一个特效
        //09 01 02 2F 28 14 00 0A 显示灵魂祝福的召唤兽用buff的特效
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(effectid);
        mplew.writeInt(skillid);
        mplew.write(0); //Ver0.78?
        mplew.write(1); // probably buff level but we don't know it and it doesn't really matter
        return mplew.getPacket();
    }

    public static MaplePacket showOwnBerserk(int skilllevel, boolean Berserk) { // 恶龙附身？
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(1);
        mplew.writeInt(1320006);
        mplew.write(skilllevel);
        mplew.write(Berserk ? 1 : 0);

        return mplew.getPacket();
    }

    public static MaplePacket showBerserk(int cid, int skilllevel, boolean Berserk) { // 恶龙附身？
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // [99 00] [5D 94 27 00] [01] [46 24 14 00] [14] [01]
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_FOREIGN_EFFECT.getValue());
        mplew.writeInt(cid);
        mplew.write(1);
        mplew.writeInt(1320006);
        mplew.write(skilllevel);
        mplew.write(Berserk ? 1 : 0);

        return mplew.getPacket();
    }

    public static MaplePacket beholderAnimation(int cid, int skillid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_FOREIGN_EFFECT.getValue());
        mplew.writeInt(cid);
        mplew.writeInt(skillid);
        mplew.writeShort(135);

        return mplew.getPacket();
    }

    //更新技能
    public static MaplePacket updateSkill(int skillid, int level, int masterlevel, boolean ProfessionSkill) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // 28 00 [01] [01 00] [FA 57 31 01] [01 00 00 00] [00 00 00 00] [00 80 05 BB 46 E6 17 02 02]
       //  27 00 [01] [01 00] [86 84 1E 00] [04 00 00 00] [00 00 00 00] [00 80 05 BB 46 E6 17 02 07]
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.UPDATE_SKILLS.getValue());
        mplew.write(1);
        mplew.writeShort(1);
        mplew.writeInt(skillid);//技能ID
        mplew.writeInt(level);//技能等级
        mplew.writeInt(masterlevel);//角色等级技能
        mplew.write(0);
        mplew.write(HexTool.getByteArrayFromHexString("80 05 BB 46 E6 17 02 02"));
        return mplew.getPacket();
    }

    //更新任务杀怪
    public static MaplePacket updateQuestMobKills(MapleQuestStatus status) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // 21 00 01 FB 03 01 03 00 30 30 31
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(1);
        mplew.writeShort(status.getQuest().getId());
        mplew.write(1);
        String killStr = "";
        for (int kills : status.getMobKills().values()) {
            killStr += StringUtil.getLeftPaddedStr(String.valueOf(kills), '0', 3);
        }
        mplew.writeMapleAsciiString(killStr);
        mplew.writeInt(0);
        mplew.writeInt(0);

        return mplew.getPacket();
    }

    public static MaplePacket getShowQuestCompletion(int id) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_QUEST_COMPLETION.getValue());
        mplew.writeShort(id);

        return mplew.getPacket();
    }

    //键盘排序
    public static MaplePacket getKeymap(Map<Integer, MapleKeyBinding> keybindings) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.KEYMAP.getValue());
        mplew.write(0);

        for (int x = 0; x < 90; x++) {
            MapleKeyBinding binding = keybindings.get(Integer.valueOf(x));
            if (binding != null) {
                mplew.write(binding.getType());
                mplew.writeInt(binding.getAction());
            } else {
                mplew.write(0);
                mplew.writeInt(0);
            }
        }

        return mplew.getPacket();
    }

    //自动吃药
    public static MaplePacket sendAutoHpPot(int itemId) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.AUTO_HP_POT.getValue());
        mplew.writeInt(itemId);

        return mplew.getPacket();
    }

    //自动吃蓝
    public static MaplePacket sendAutoMpPot(int itemId) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.AUTO_MP_POT.getValue());
        mplew.writeInt(itemId);

        return mplew.getPacket();
    }

    //悄悄话
    public static MaplePacket getWhisper(String sender, int channel, String text) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.WHISPER.getValue());
        mplew.write(18);
        mplew.writeMapleAsciiString(sender);
        mplew.writeShort(channel - 1);
        mplew.writeMapleAsciiString(text);

        return mplew.getPacket();
    }

    /**
     *悄悄话
     * @param target name of the target character
     * @param reply error code: 0x0 = cannot find char, 0x1 = success
     * @return the MaplePacket
     */
    public static MaplePacket getWhisperReply(String target, byte reply) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.WHISPER.getValue());
        mplew.write(10);
        mplew.writeMapleAsciiString(target);
        mplew.write(reply);

        return mplew.getPacket();
    }

    public static MaplePacket getFindReplyWithMap(String target, int mapid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.WHISPER.getValue());
        mplew.write(9);
        mplew.writeMapleAsciiString(target);
        mplew.write(1);
        mplew.writeInt(mapid);
        mplew.write(new byte[8]); // ?? official doesn't send zeros here but whatever

        return mplew.getPacket();
    }

    public static MaplePacket getFindReply(String target, int channel) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // Received UNKNOWN (1205941596.79689): (25)
        // 54 00 09 07 00 64 61 76 74 73 61 69 01 86 7F 3D 36 D5 02 00 00 22 00
        // 00 00
        // T....davtsai..=6...."...
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.WHISPER.getValue());
        mplew.write(9);
        mplew.writeMapleAsciiString(target);
        mplew.write(3);
        mplew.writeInt(channel - 1);

        return mplew.getPacket();
    }

    //背包满了
    public static MaplePacket getInventoryFull() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        //右下角显示[不能捡取物品。]
        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(1);
        mplew.write(0);

        return mplew.getPacket();
    }

    public static MaplePacket getShowInventoryFull() {
        return getShowInventoryStatus(0xFF);
    }

    public static MaplePacket showItemUnavailable() {
        return getShowInventoryStatus(0xFE);
    }

    public static MaplePacket getShowInventoryStatus(int mode) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(0);
        mplew.write(mode);
        //93去除
        //mplew.writeInt(0);
        //mplew.writeInt(0);

        return mplew.getPacket();
    }

    //仓库
    public static MaplePacket getStorage(int npcId, byte slots, Collection<IItem> items, int meso) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.OPEN_STORAGE.getValue());
        mplew.write(0x16);
        mplew.writeInt(npcId);
        mplew.write(slots);
        mplew.writeShort(0x7E);
        mplew.writeShort(0);
        mplew.writeInt(0);
        mplew.writeInt(meso);
        mplew.write((byte) items.size());
        for (IItem item : items) {
            addItemInfo(mplew, item, true, true, true);
        }
        mplew.writeInt(0);

        return mplew.getPacket();
    }

    //仓库满了
    public static MaplePacket getStorageFull() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.OPEN_STORAGE.getValue());
        mplew.write(0x11);

        return mplew.getPacket();
    }

    //金币仓库
    public static MaplePacket mesoStorage(byte slots, int meso) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.OPEN_STORAGE.getValue());
        mplew.write(0x13);
        mplew.write(slots);
        mplew.writeShort(2);
        mplew.writeShort(0);
        mplew.writeInt(0);
        mplew.writeInt(meso);

        return mplew.getPacket();
    }

    //存入仓库
    public static MaplePacket storeStorage(byte slots, MapleInventoryType type, Collection<IItem> items) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.OPEN_STORAGE.getValue());
        mplew.write(0xD);
        mplew.write(slots);
        mplew.writeShort(type.getBitfieldEncoding());
        mplew.writeShort(0);
        mplew.writeInt(0);
        mplew.write(items.size());
        for (IItem item : items) {
            addItemInfo(mplew, item, true, true, true);
        // mplew.write(0);
        }

        return mplew.getPacket();
    }

    //仓库取出
    public static MaplePacket takeOutStorage(byte slots, MapleInventoryType type, Collection<IItem> items) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.OPEN_STORAGE.getValue());
        mplew.write(0x9);
        mplew.write(slots);
        mplew.writeShort(type.getBitfieldEncoding());
        mplew.writeShort(0);
        mplew.writeInt(0);
        mplew.write(items.size());
        for (IItem item : items) {
            addItemInfo(mplew, item, true, true, true);
        // mplew.write(0);
        }

        return mplew.getPacket();
    }


    //显示怪物HP
    public static MaplePacket showMonsterHP(int oid, int remhppercentage) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //[1F 01] [2B 37 94 00] 50
        //[29 01] [E2 3C 6C 01] 5A
        mplew.writeShort(SendPacketOpcode.SHOW_MONSTER_HP.getValue());
        mplew.writeInt(oid);
        mplew.write(remhppercentage);

        return mplew.getPacket();
    }

    //显示BOSS HP
    public static MaplePacket showBossHP(int oid, int currHP, int maxHP, byte tagColor, byte tagBgColor) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //53 00 05 21 B3 81 00 46 F2 5E 01 C0 F3 5E 01 04 01
        //00 81 B3 21 = 8500001 = Pap monster ID
        //01 5E F3 C0 = 23,000,000 = Pap max HP
        //04, 01 - boss bar color/background color as provided in WZ
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //93 00 [05] [21 B3 81 00] [AD C5 5E 01] [C0 F3 5E 01] 04 01
        mplew.writeShort(SendPacketOpcode.BOSS_ENV.getValue());
        //System.out.println("显示怪物血条"+SendPacketOpcode.BOSS_ENV.getValue());
        mplew.write(5);
        mplew.writeInt(oid);
        mplew.writeInt(currHP);
        //System.out.println("BOSSHP:"+currHP);
        mplew.writeInt(maxHP);
        //System.out.println("BOSSMAXHP:"+currHP);
        mplew.write(tagColor);
        mplew.write(tagBgColor);

        return mplew.getPacket();
    }

     //人气反馈
    public static MaplePacket giveFameResponse(int mode, String charname, int newfame) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.FAME_RESPONSE.getValue());
        mplew.write(0);
        mplew.writeMapleAsciiString(charname);
        mplew.write(mode);
        mplew.writeShort(newfame);
        mplew.writeShort(0);

        return mplew.getPacket();
    }

    /**
     * status can be: <br>
     * 0: ok, use giveFameResponse<br>
     * 1: the username is incorrectly entered<br>
     * 2: users under level 15 are unable to toggle with fame.<br>
     * 3: can't raise or drop fame anymore today.<br>
     * 4: can't raise or drop fame for this character for this month anymore.<br>
     * 5: received fame, use receiveFame()<br>
     * 6: level of fame neither has been raised nor dropped due to an unexpected
     * error
     *
     * @param status
     * @return
     */
    public static MaplePacket giveFameErrorResponse(int status) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.FAME_RESPONSE.getValue());
        mplew.write(status);

        return mplew.getPacket();
    }

    public static MaplePacket receiveFame(int mode, String charnameFrom) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.FAME_RESPONSE.getValue());
        mplew.write(5);
        mplew.writeMapleAsciiString(charnameFrom);
        mplew.write(mode);

        return mplew.getPacket();
    }


    //开启组队
    public static MaplePacket partyCreated(MapleParty party) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //3D 00 [08] [DC 40] [01 00] [FF C9 9A 3B] [FF C9 9A 3B] [00 00 00 00] 6D 1D 01 25
        mplew.writeShort(SendPacketOpcode.PARTY_OPERATION.getValue());
        mplew.write(8);
        mplew.writeInt(party.getId());
        mplew.writeInt(999999999);
        mplew.writeInt(999999999);
        mplew.writeInt(0);
        mplew.write(HexTool.getByteArrayFromHexString("D0 9C A3 12"));
        return mplew.getPacket();
    }

    //组队邀请
    public static MaplePacket partyInvite(MapleCharacter from) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
//3C 00 [04] [96 4B 00 00] [0A 00 CB A7 C6 F8 B5 C4 BF F1 CF E8] 78 00 00 00 B2 01 00 00 00
        mplew.writeShort(SendPacketOpcode.PARTY_OPERATION.getValue());
        mplew.write(4);
        mplew.writeInt(from.getParty().getId());
        mplew.writeMapleAsciiString(from.getName());
        mplew.writeInt(from.getLevel());
        mplew.writeInt(from.getJob().getId());
        mplew.write(0);
        return mplew.getPacket();
    }

    /**
     * 10: A beginner can't create a party.
     * 1/11/14/19: Your request for a party didn't work due to an unexpected error.
     * 13: You have yet to join a party.
     * 16: Already have joined a party.
     * 17: The party you're trying to join is already in full capacity.
     * 19: Unable to find the requested character in this channel.
     *
     * @param message
     * @return
     */

    //组队消息
    public static MaplePacket partyStatusMessage(int message) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        // 32 00 08 DA 14 00 00 FF C9 9A 3B FF C9 9A 3B 22 03 6E 67
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PARTY_OPERATION.getValue());
        mplew.write(message);
        return mplew.getPacket();
    }

    /**
     * 23: 'Char' have denied request to the party.
     *
     * @param message
     * @param charname
     * @return
     */
    public static MaplePacket partyStatusMessage(int message, String charname) {
        // 32 00 08 DA 14 00 00 FF C9 9A 3B FF C9 9A 3B 22 03 6E 67
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.PARTY_OPERATION.getValue());
        mplew.write(message);
        mplew.writeMapleAsciiString(charname);

        return mplew.getPacket();
    }

    //加入组队状态
    private static void addPartyStatus(int forchannel, MapleParty party, LittleEndianWriter lew, boolean leaving) {
        List<MaplePartyCharacter> partymembers = new ArrayList<MaplePartyCharacter>(party.getMembers());
        while (partymembers.size() < 6) {
            partymembers.add(new MaplePartyCharacter());
        }
        for (MaplePartyCharacter partychar : partymembers) {
            lew.writeInt(partychar.getId());
        }
        //083++
        for (int i = 0; i < 6 - partymembers.size(); i++) {
            lew.writeInt(0);
        }
        for (MaplePartyCharacter partychar : partymembers) {
            lew.writeAsciiString(StringUtil.getRightPaddedStr(partychar.getName(), '\0', 13));
        }
        //083++
        for (int i = 0; i < 6 - partymembers.size(); i++) {
            lew.writeLong(0);
            lew.writeInt(0);
            lew.write(0);
        }
        for (MaplePartyCharacter partychar : partymembers) {
            lew.writeInt(partychar.getJobId());
        }
        //083++
        for (int i = 0; i < 6 - partymembers.size(); i++) {
            lew.writeInt(0);
        }
        for (MaplePartyCharacter partychar : partymembers) {
            lew.writeInt(partychar.getLevel());
        }
        //083++
        for (int i = 0; i < 6 - partymembers.size(); i++) {
            lew.writeInt(0);
        }
        for (MaplePartyCharacter partychar : partymembers) {
            if (partychar.isOnline()) {
                lew.writeInt(partychar.getChannel() - 1);
            } else {
                lew.writeInt(-2);
            }
        }
        //083++
        for (int i = 0; i < 6 - partymembers.size(); i++) {
            lew.write(HexTool.getByteArrayFromHexString("FE FF FF FF"));
        }
        //093
        for (int i = 0; i < 6; i++) {
            lew.write(HexTool.getByteArrayFromHexString("00 00 00 00"));
        }
        lew.writeInt(party.getLeader().getId());
        for (MaplePartyCharacter partychar : partymembers) {
            if (partychar.getChannel() == forchannel) {
                lew.writeInt(partychar.getMapid());
            } else {
                lew.writeInt(999999999);
            }
        }
        //085++
        for (int i = 0; i < 6 - partymembers.size(); i++) {
            lew.writeInt(0);
        }

//        for (MaplePartyCharacter partychar : partymembers) {
//            if (partychar.getChannel() == forchannel && !leaving) {
//                lew.writeInt(partychar.getDoorTown());
//                lew.writeInt(partychar.getDoorTarget());
//                lew.writeInt(partychar.getDoorPosition().x);
//                lew.writeInt(partychar.getDoorPosition().y);
//            } else {
//                lew.writeInt(0);
//                lew.writeInt(0);
//                lew.writeInt(0);
//                lew.writeInt(0);
//            }
//        }
        for (MaplePartyCharacter partychar : partymembers) {
            lew.write(HexTool.getByteArrayFromHexString("FF C9 9A 3B FF C9 9A 3B"));
            lew.writeInt(0);//085++
            lew.write(HexTool.getByteArrayFromHexString("20 30 2C 20 20 30 2C 20"));
        }
        for (int i = 0; i < 6 - partymembers.size(); i++) {
            lew.write(HexTool.getByteArrayFromHexString("FF C9 9A 3B FF C9 9A 3B"));
            lew.writeInt(0);//085++
            lew.write(HexTool.getByteArrayFromHexString("FF FF FF FF FF FF FF FF"));
        }
        //091++
        for (MaplePartyCharacter partychar : partymembers) {
            lew.write(HexTool.getByteArrayFromHexString("FF 00 00 00"));
        }
        //091++
        for (int i = 0; i < 6 - partymembers.size(); i++) {
            lew.write(HexTool.getByteArrayFromHexString("00 00 00 00"));
        }
        lew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00"));//091++
        lew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00"));//091++
        lew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00"));//091++
        lew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00"));//091++
    }

    /*
    private static void addPartyStatus(int forchannel, MapleParty party, LittleEndianWriter lew, boolean leaving) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        List<MaplePartyCharacter> partymembers = new ArrayList<MaplePartyCharacter>(party.getMembers());
        while (partymembers.size() < 6) {
            partymembers.add(new MaplePartyCharacter());
        }
        for (MaplePartyCharacter partychar : partymembers) {
            lew.writeInt(partychar.getId());
        }
        for (MaplePartyCharacter partychar : partymembers) {
            lew.writeAsciiString(StringUtil.getRightPaddedStr(partychar.getName(), '\0', 13));
        }
        for (MaplePartyCharacter partychar : partymembers) {
            lew.writeInt(partychar.getJobId());
        }
        for (MaplePartyCharacter partychar : partymembers) {
            lew.writeInt(partychar.getLevel());
        }
        for (MaplePartyCharacter partychar : partymembers) {
          if (partychar.isOnline()) {
              lew.writeInt(partychar.getChannel() - 1);
          }else {
              lew.writeInt(-2);
          }
        }
        lew.writeInt(party.getLeader().getId());
        for (MaplePartyCharacter partychar : partymembers) {
            if (partychar.getChannel() == forchannel) {
                lew.writeInt(partychar.getMapid());
            } else {
                lew.writeInt(999999999);
            }
        }
        for (MaplePartyCharacter partychar : partymembers) {
            if ((partychar.getChannel() == forchannel) && (!(leaving))) {
                lew.writeInt(partychar.getDoorTown());
                lew.writeInt(partychar.getDoorTarget());
                lew.writeInt(0);
                lew.writeInt(partychar.getDoorPosition().x);
                lew.writeInt(partychar.getDoorPosition().y);
            } else {
                lew.writeInt(999999999);
                lew.writeInt(999999999);
                lew.writeInt(0);
                lew.writeInt(-1);
                lew.writeInt(-1);
            }
        }
        lew.write(HexTool.getByteArrayFromHexString("FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00 00"));
        lew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"));
    }
    */

    public static MaplePacket updateParty(int forChannel, MapleParty party, PartyOperation op, MaplePartyCharacter target) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.PARTY_OPERATION.getValue());
        switch (op) {
            case DISBAND:
            case EXPEL:
            case LEAVE:
                mplew.write(0xC);
                mplew.writeInt(party.getId());
                mplew.writeInt(target.getId());

                if (op == PartyOperation.DISBAND) {
                    mplew.write(0);
                    mplew.writeInt(party.getId());
                } else {
                    mplew.write(1);
                    if (op == PartyOperation.EXPEL) {
                        mplew.write(1);
                    } else {
                        mplew.write(0);
                    }
                    mplew.writeMapleAsciiString(target.getName());
                    addPartyStatus(forChannel, party, mplew, false);
                    //addLeavePartyTail(mplew);
                }

                break;
            case JOIN:
                mplew.write(0xF);
                mplew.writeInt(party.getId());
                mplew.writeMapleAsciiString(target.getName());
                addPartyStatus(forChannel, party, mplew, false);
                // addJoinPartyTail(mplew);
                break;
            case SILENT_UPDATE:
            case LOG_ONOFF:
                mplew.write(0x7);
                mplew.writeInt(party.getId());
                addPartyStatus(forChannel, party, mplew, false);
                break;
            case CHANGE_LEADER:
                mplew.write(0x1A);
                mplew.writeInt(target.getId());
                mplew.write(0);
                break;

        }

        return mplew.getPacket();
    }

    //组队端口
    public static MaplePacket partyPortal(int townId, int targetId, Point position) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.PARTY_OPERATION.getValue());
        mplew.writeShort(0x23);
        mplew.writeInt(townId);
        mplew.writeInt(targetId);
        mplew.writeShort(position.x);
        mplew.writeShort(position.y);

        return mplew.getPacket();
    }

    public static MaplePacket updatePartyMemberHP(int cid, int curhp, int maxhp) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.UPDATE_PARTYMEMBER_HP.getValue());
        mplew.writeInt(cid);
        mplew.writeInt(curhp);
        mplew.writeInt(maxhp);

        return mplew.getPacket();
    }

    /**
     * mode: 0 buddychat好友聊天; 1 partychat组队聊天; 2 guildchat家族聊天; 3 Alliance chat联盟聊天
     *
     * @param name
     * @param chattext
     * @param mode
     * @return
     */
    public static MaplePacket multiChat(String name, String chattext, int mode) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MULTICHAT.getValue());
        mplew.write(mode);
        mplew.writeMapleAsciiString(name);
        mplew.writeMapleAsciiString(chattext);

        return mplew.getPacket();
    }

    public static MaplePacket applyMonsterStatus(MapleMonster mob, MapleCharacter chr, int oid, Map<MonsterStatus, Integer> stats, int skill, boolean monsterSkill, int delay) {
        return applyMonsterStatus(mob, chr, oid, stats, skill, monsterSkill, delay, null);
    }

    //应用怪物状态 添加怪物状态
    public static MaplePacket applyMonsterStatus(MapleMonster mob, MapleCharacter chr, int oid, Map<MonsterStatus, Integer> stats, int skill, boolean monsterSkill, int delay, MobSkill mobskill) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        /*
         * 战神之审判
         * 有毒buff的要分开处理
         * 51 01
         * F5 8F 6A 00
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 01 00 08
         * 01 00
         * FB 1C 42 01
         * 16 00
         *
         * 01
         * 9F 1E 44 00 //cid
         * FB 1C 42 01 //skillid
         * FE 1F 00 00 //每次扣除的血量
         * E8 03 00 00 //隔多久扣血一次[毫秒]
         * 57 0E 62 1E //?
         * 06 00 00 00 //毒的期间扣血多少次
         *
         * 56 04 02 01
         */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.APPLY_MONSTER_STATUS.getValue());
        mplew.writeInt(oid);
        long mask = 0;
        boolean isPoison = false;
        for (MonsterStatus stat : stats.keySet()) {
            mask |= stat.getValue();
            if(stat.getValue() == MonsterStatus.POISON.getValue())
                isPoison = true;
        }
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(mask);
        for (Integer val : stats.values()) {
            if(isPoison)
                continue;
            mplew.writeShort(val);
            if (monsterSkill) {
                mplew.writeShort(mobskill.getSkillId());
                mplew.writeShort(mobskill.getSkillLevel());
            } else {
                mplew.writeInt(skill);
            }
            if(stats.size() > 1)
                mplew.writeShort(delay);
            //注意 这个函数中没有buff的持续时间
        }
        if(!isPoison) {
            mplew.writeShort(delay);
        } else {
            mplew.write(1);
            mplew.writeInt(chr.getId());
            mplew.writeInt(skill);
            mplew.writeInt(stats.get(MonsterStatus.POISON));//获取每次扣除的血量
            mplew.writeInt(1000);//隔多久扣血一次[毫秒]
            mplew.writeInt(Randomizer.nextInt());
            mplew.writeInt(10);//毒的期间扣血多少次
        }
        //这4个不知道是什么
        mplew.write(0x5C);
        mplew.write(0);
        if(skill != 机械师.加速器)
            mplew.write(1);
        if(checkHaveGivePacket(skill)) //有些技能最后没有这一位
            mplew.write(1);
        //System.out.println("给怪物BUFF的封包："+mplew.toString());
        return mplew.getPacket();
    }

    public static boolean checkHaveGivePacket(int skillid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        switch(skillid){
            case 标飞.忍者伏击: //忍者伏击
            case 刀飞.忍者伏击:
            case 标飞.挑衅: //挑衅
            case 刀飞.挑衅:
            case 战神.抗压://抗压
            case 双刀.怪物炸弹: //怪物炸弹
            case 龙神.鬼刻符://鬼刻符
            case 勇士.魔击无效: //魔击无效
            case 骑士.魔击无效:
            case 龙骑.魔击无效:
            case 机械师.加速器:
            case 火毒.毒雾术:
                return false;
        }
        return true;
    }


    // 取消怪物状态
    public static MaplePacket cancelMonsterStatus(int cid, int oid, Map<MonsterStatus, Integer> stats, int skillid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*
         * 52 01
         * E7 2E 42 00
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 80 00 00 00
         * 01 02
         */
        /*
         * 冰冻术
         * 52 01
         * 01 87 33 01
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 01 00 00
         * 03 02
         */
        mplew.writeShort(SendPacketOpcode.CANCEL_MONSTER_STATUS.getValue());
        mplew.writeInt(oid);
        long mask = 0;
        boolean isPoison = false;
        //boolean checkHaveCancelPacket = false;
        for (MonsterStatus stat : stats.keySet()) {
            mask |= stat.getValue();
            if(stat.getValue() == MonsterStatus.POISON.getValue())
                isPoison = true;
            /*
            else if(stat.getValue() == MonsterStatus.STUN.getValue())
                checkHaveCancelPacket = true;
            */
        }
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(mask);
        if(isPoison) {
            mplew.writeInt(1);
            mplew.writeInt(cid);
            mplew.writeInt(skillid);
        }
        mplew.write(3);
        mplew.write(2);
        if(checkHaveCancelPacket(skillid)/* || checkHaveCancelPacket*/) //有些技能多了这一位
            mplew.write(2);
        return mplew.getPacket();
    }

    public static boolean checkHaveCancelPacket(int skillid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        switch(skillid){
            case 火毒.毒雾术:
            case 机械师.加速器:
                return true;
        }
        return false;
    }
    //时钟
    public static MaplePacket getClock(int time) { // time in seconds
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CLOCK.getValue());
        mplew.write(2); // clock type. if you send 3 here you have to send another byte (which does not matter at all) before the timestamp
        mplew.writeInt(time);

        return mplew.getPacket();
    }

    public static MaplePacket getClockTime(int hour, int min, int sec) { // Current Time
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CLOCK.getValue());
        mplew.write(1); // Clock-Type
        mplew.write(hour);
        mplew.write(min);
        mplew.write(sec);
        return mplew.getPacket();
    }

    //召唤LOVE
    public static MaplePacket spawnLove(int oid, int itemid, String name, String msg, Point pos, int ft) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SPAWN_LOVE.getValue());
        mplew.writeInt(oid);
        mplew.writeInt(itemid);
        mplew.writeMapleAsciiString(msg);
        mplew.writeMapleAsciiString(name);
        mplew.writeShort(pos.x);
        mplew.writeShort(ft);
        return mplew.getPacket();
    }

    //移除LOVE
    public static MaplePacket removeLove(int oid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.REMOVE_LOVE.getValue());
        mplew.writeInt(oid);
        return mplew.getPacket();
    }

    public static MaplePacket spawnFace(int skill) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(0xCF);
        mplew.writeInt(skill);
        return mplew.getPacket();
    }


    //召唤烟雾
    public static MaplePacket spawnMist(MapleMist mist) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        Rectangle position = mist.getBox();
        mplew.writeShort(SendPacketOpcode.SPAWN_MIST.getValue());
        mplew.writeInt(mist.getObjectId());
        mplew.writeInt(mist.getMistValue1());
        mplew.writeInt(mist.isMobMist() ? mist.getMobOwner().getId() : mist.getOwner().getId());
        mplew.writeInt(mist.isItemMist() ? mist.getSourceId() : mist.isMobMist() ? mist.getMobSkill().getSkillId() : mist.getSourceSkill().getId());
        mplew.write(mist.isItemMist() ? 0 : mist.isMobMist() ? mist.getMobSkill().getSkillLevel(): mist.getOwner().getSkillLevel(mist.getSourceSkill()));
        mplew.writeShort(mist.getMistValue2());
        mplew.writeInt(position.x);
        mplew.writeInt(position.y);
        mplew.writeInt(position.x + position.width);
        mplew.writeInt(position.y + position.height);
        mplew.writeInt(0);
        //System.out.println("烟雾值1: "+(mist.isMobMist() ? 0 : mist.isPoison() ? 1 : mist.isItemMist() ? 3 : 2));
        //ystem.out.println("itemid: "+mist.getSourceId());
        //System.out.println("烟雾值2: "+(mist.isMobMist() ? 0 : mist.isItemMist() ? 3 : 8));
        System.out.println("烟雾值1: "+mist.getMistValue1());
        System.out.println("烟雾值2: "+mist.getMistValue2());
        return mplew.getPacket();
    }

    //臭屁 花香
    public static MaplePacket spawnCashMist(MapleCharacter chr, int itemid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        int x = chr.getPosition().x;
        int y = chr.getPosition().y;
        int x1 = -110 + x;
        int y1 = -82 + y;
        int x2 = 110 + x;
        int y2 = 83 + y;
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SPAWN_MIST.getValue());
        mplew.writeInt(104);
        mplew.writeInt(3);
        mplew.writeInt(chr.getId());
        mplew.writeInt(itemid);
        mplew.write(0);
        mplew.writeShort(3);
        mplew.writeInt(x1);
        mplew.writeInt(y1);
        mplew.writeInt(x2);
        mplew.writeInt(y2);
        mplew.writeInt(0);
        return mplew.getPacket();
    }

    //移除烟雾
    public static MaplePacket removeMist(int oid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.REMOVE_MIST.getValue());
        mplew.writeInt(oid);

        return mplew.getPacket();
    }

    //怪物伤害
    public static MaplePacket damageMonster(int oid, int damage) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.DAMAGE_MONSTER.getValue());
        mplew.writeInt(oid);
        mplew.write(0);
        mplew.writeInt(damage);

        return mplew.getPacket();
    }

    //怪物伤害
    public static MaplePacket healMonster(int oid, int heal) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.DAMAGE_MONSTER.getValue());
        mplew.writeInt(oid);
        mplew.write(0);
        mplew.writeInt(-heal);

        return mplew.getPacket();
    }

    //更新好友列表
    public static MaplePacket updateBuddylist(Collection<BuddylistEntry> buddylist) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.BUDDYLIST.getValue());
        mplew.write(7);
        mplew.write(buddylist.size());
        for (BuddylistEntry buddy : buddylist) {
            if (buddy.isVisible()) {
                mplew.writeInt(buddy.getCharacterId()); // cid
                mplew.writeAsciiString(StringUtil.getRightPaddedStr(buddy.getName(), '\0', 13));
                mplew.write(0);
                mplew.writeInt(buddy.getChannel() - 1);
                mplew.writeAsciiString(StringUtil.getRightPaddedStr(buddy.getGroup(), '\0', 17));
            }
        }
        for (int x = 0; x < buddylist.size(); x++) {
            mplew.writeInt(0);
        }
        return mplew.getPacket();
    }

    //好友列表消息
    public static MaplePacket buddylistMessage(byte message) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.BUDDYLIST.getValue());
        mplew.write(message);

        return mplew.getPacket();
    }

    //申请加好友
    public static MaplePacket requestBuddylistAdd(int cidFrom, String nameFrom, int charlevel, int channel) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.BUDDYLIST.getValue());
        mplew.write(9);
        mplew.writeInt(cidFrom);
        mplew.writeMapleAsciiString(nameFrom);
        mplew.writeInt(charlevel);
        mplew.writeInt(0x7A); //char job
        mplew.writeInt(cidFrom);
        //mplew.writeAsciiString(nameFrom);
        //mplew.writeLong(0);
        mplew.writeAsciiString(StringUtil.getRightPaddedStr(nameFrom, '\0', 13));
        mplew.write(1);
        mplew.writeInt(channel - 1);
        mplew.writeAsciiString("未指定群组");
        mplew.writeLong(0);
        return mplew.getPacket();
    }

    //更新好友的频道
    public static MaplePacket updateBuddyChannel(int characterid, int channel) {
        // 38 00 14 F5 C5 58 00 00 06 00 00 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.BUDDYLIST.getValue());
        mplew.write(0x14);
        mplew.writeInt(characterid);
        mplew.write(0);
        mplew.writeInt(channel);

        return mplew.getPacket();
    }

    //显示物品效果
    public static MaplePacket itemEffect(int characterid, int itemid) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_EFFECT.getValue());

        mplew.writeInt(characterid);
        mplew.writeInt(itemid);

        return mplew.getPacket();
    }

   // public static MaplePacket itemEffects(int characterid, int itemid) {
      //  MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
      //  log.info("该死的增益效果");
      //  mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());

     //   mplew.writeInt(characterid);
     //   mplew.writeInt(itemid);
      //  mplew.writeLong(0);
      //  return mplew.getPacket();
  //  }

    //物品效果能力
    public static MaplePacket updateBuddyCapacity(int capacity) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.BUDDYLIST.getValue());
        mplew.write(0x15);
        mplew.write(capacity);


        return mplew.getPacket();
    }


    //椅子效果
    public static MaplePacket showChair(int characterid, int itemid) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.SHOW_CHAIR.getValue());

        mplew.writeInt(characterid);
        mplew.writeInt(itemid);

        return mplew.getPacket();
    }

    //取消椅子
    public static MaplePacket cancelChair() {
        return cancelChair(-1);
    }

    public static MaplePacket cancelChair(int id) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CANCEL_CHAIR.getValue());
        if (id == -1) {
            mplew.write(0);
        } else {
            mplew.write(1);
            mplew.writeShort(id);
        }
        return mplew.getPacket();
    }

    // is there a way to spawn reactors non-animated?
    public static MaplePacket spawnReactor(MapleReactor reactor) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        Point pos = reactor.getPosition();
        mplew.writeShort(SendPacketOpcode.REACTOR_SPAWN.getValue());
        mplew.writeInt(reactor.getObjectId());
        mplew.writeInt(reactor.getId());
        mplew.write(reactor.getState());
        mplew.writeShort(pos.x);
        mplew.writeShort(pos.y);
        mplew.write(0);
        mplew.writeShort(0);

        return mplew.getPacket();
    }

    public static MaplePacket triggerReactor(MapleReactor reactor, int stance) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        Point pos = reactor.getPosition();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        /*
         * 86 01 [E8 05 FA 00] [01] [F5 08] [69 FF] 89 01 00 09
         * 86 01 E8 05 FA 00 02 F5 08 69 FF 89 01 00 04
         * 86 01 E8 05 FA 00 03 F5 08 69 FF 89 01 00 04
         */
        mplew.writeShort(SendPacketOpcode.REACTOR_HIT.getValue());
        mplew.writeInt(reactor.getObjectId());
        mplew.write(reactor.getState());
        mplew.writeShort(pos.x);
        mplew.writeShort(pos.y);
        mplew.writeShort(stance);
        mplew.write(0);
        mplew.write(4);
        return mplew.getPacket();
    }

    public static MaplePacket destroyReactor(MapleReactor reactor) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        Point pos = reactor.getPosition();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行

        mplew.writeShort(SendPacketOpcode.REACTOR_DESTROY.getValue());
        mplew.writeInt(reactor.getObjectId());
        mplew.write(reactor.getState());
        mplew.writeShort(pos.x);
        mplew.writeShort(pos.y);

        return mplew.getPacket();
    }

    public static MaplePacket musicChange(String song) {
        return environmentChange(song, 6);
    }

    public static MaplePacket showEffect(String effect) {
        return environmentChange(effect, 3);
    }

    public static MaplePacket playSound(String sound) {
        return environmentChange(sound, 4);
    }


    //BOSS血条
    public static MaplePacket environmentChange(String env, int mode) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //1F 01 B9 00 00 00 08 00 01 0A 00 00 00
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.BOSS_ENV.getValue());
        mplew.write(mode);
        mplew.writeMapleAsciiString(env);

        return mplew.getPacket();
    }

    //开始地图效果
    public static MaplePacket startMapEffect(String msg, int itemid, boolean active) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MAP_EFFECT.getValue());
        mplew.write(active ? 0 : 1);

        mplew.writeInt(itemid);
        if (active) {
            mplew.writeMapleAsciiString(msg);
        }

        return mplew.getPacket();
    }

    public static MaplePacket removeMapEffect() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MAP_EFFECT.getValue());
        mplew.write(0);
        mplew.writeInt(0);

        return mplew.getPacket();
    }



    //家族
    private static void getGuildInfo(MaplePacketLittleEndianWriter mplew, MapleGuild guild) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeInt(guild.getId());
        mplew.writeMapleAsciiString(guild.getName());
        for (int i = 1; i <= 5; i++) {
            mplew.writeMapleAsciiString(guild.getRankTitle(i));
        }
        Collection<MapleGuildCharacter> members = guild.getMembers();
        mplew.write(members.size());
        //then it is the size of all the members
        for (MapleGuildCharacter mgc : members) //and each of their character ids o_O
        {
            mplew.writeInt(mgc.getId());
        }
        for (MapleGuildCharacter mgc : members) {
            mplew.writeAsciiString(StringUtil.getRightPaddedStr(mgc.getName(), '\0', 13));
            mplew.writeInt(mgc.getJobId());
            mplew.writeInt(mgc.getLevel());
            mplew.writeInt(mgc.getGuildRank());
            mplew.writeInt(mgc.isOnline() ? 1 : 0);
            mplew.writeInt(guild.getSignature());
            mplew.writeInt(mgc.getAllianceRank());
        }
        mplew.writeInt(guild.getCapacity());
        mplew.writeShort(guild.getLogoBG());
        mplew.write(guild.getLogoBGColor());
        mplew.writeShort(guild.getLogo());
        mplew.write(guild.getLogoColor());
        mplew.writeMapleAsciiString(guild.getNotice());
        mplew.writeInt(guild.getGP());
        mplew.writeInt(guild.getAllianceId());
    }

    public static void addThread(MaplePacketLittleEndianWriter mplew, ResultSet rs) throws SQLException {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeInt(rs.getInt("localthreadid"));
        mplew.writeInt(rs.getInt("postercid"));
        mplew.writeMapleAsciiString(rs.getString("name"));
        mplew.writeLong(DateUtil.getFileTimestamp(rs.getLong("timestamp")));
        mplew.writeInt(rs.getInt("icon"));
        mplew.writeInt(rs.getInt("replycount"));
    }

    public static MaplePacket BBSThreadList(ResultSet rs, int start) throws SQLException {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.BBS_OPERATION.getValue());
        mplew.write(0x06);
        if (!rs.last()) {
            //no result at all
            mplew.write(0);
            mplew.writeInt(0);
            mplew.writeInt(0);
            return mplew.getPacket();
        }
        int threadCount = rs.getRow();
        if (rs.getInt("localthreadid") == 0) { //has a notice
            mplew.write(1);
            addThread(mplew, rs);
            threadCount--; //one thread didn't count (because it's a notice)
        } else {
            mplew.write(0);
        }
        if (!rs.absolute(start + 1)) { //seek to the thread before where we start
            rs.first(); //uh, we're trying to start at a place past possible
            start = 0;
        // System.out.println("Attempting to start past threadCount");
        }
        mplew.writeInt(threadCount);
        mplew.writeInt(Math.min(10, threadCount - start));
        for (int i = 0; i < Math.min(10, threadCount - start); i++) {
            addThread(mplew, rs);
            rs.next();
        }

        return mplew.getPacket();
    }

    public static MaplePacket showThread(int localthreadid, ResultSet threadRS, ResultSet repliesRS) throws SQLException, RuntimeException {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.BBS_OPERATION.getValue());
        mplew.write(0x07);
        mplew.writeInt(localthreadid);
        mplew.writeInt(threadRS.getInt("postercid"));
        mplew.writeLong(DateUtil.getFileTimestamp(threadRS.getLong("timestamp")));
        mplew.writeMapleAsciiString(threadRS.getString("name"));
        mplew.writeMapleAsciiString(threadRS.getString("startpost"));
        mplew.writeInt(threadRS.getInt("icon"));
        if (repliesRS != null) {
            int replyCount = threadRS.getInt("replycount");
            mplew.writeInt(replyCount);
            int i;
            for (i = 0; i < replyCount && repliesRS.next(); i++) {
                mplew.writeInt(repliesRS.getInt("replyid"));
                mplew.writeInt(repliesRS.getInt("postercid"));
                mplew.writeLong(DateUtil.getFileTimestamp(repliesRS.getLong("timestamp")));
                mplew.writeMapleAsciiString(repliesRS.getString("content"));
            }
            if (i != replyCount || repliesRS.next()) {
                //in the unlikely event that we lost count of replyid
                throw new RuntimeException(String.valueOf(threadRS.getInt("threadid")));
            /**
             *we need to fix the database and stop the packet sending or else it'll probably error 38 whoever tries to read it
             *there is ONE case not checked, and that's when the thread has a replycount of 0 and there is one or more replies to the
             *thread in bbs_replies
             */
            }
        } else {
            mplew.writeInt(0); //0 replies
        }
        return mplew.getPacket();
    }

    //技能效果
    public static MaplePacket skillEffect(MapleCharacter from, int skillId, int level, byte flags, int speed, int op) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //D0 00 [B9 08 01 00] [0B 3D 42 00] [01] [C4] [00] [02]
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //F2 00 7A 1F 47 00 F1 62 F9 01 01 20 00 06
        mplew.writeShort(SendPacketOpcode.SKILL_EFFECT.getValue());
        //System.out.println("技能效果");
        mplew.writeInt(from.getId());
        mplew.writeInt(skillId);
        mplew.write(level);
        mplew.write(flags);
        mplew.write(speed);
        mplew.write(op);

        return mplew.getPacket();
    }

    //取消技能效果
    public static MaplePacket skillCancel(MapleCharacter from, int skillId) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //F4 00 7A 1F 47 00 F1 62 F9 01
        mplew.writeShort(SendPacketOpcode.CANCEL_SKILL_EFFECT.getValue());
        //System.out.println("取消技能效果");
        mplew.writeInt(from.getId());
        mplew.writeInt(skillId);

        return mplew.getPacket();
    }

    //磁铁效果
    public static MaplePacket showMagnet(int mobid, byte success) { // Monster Magnet
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.SHOW_MAGNET.getValue());
        mplew.writeInt(mobid);
        mplew.write(success);

        return mplew.getPacket();
    }

    /**
     * Sends a player hint.
     *
     * @param hint The hint it's going to send.
     * @param width How tall the box is going to be.
     * @param height How long the box is going to be.
     * @return The player hint packet.
     */
        //DF 00 [60 B5 6C 00 01 60] [18 23] [00 01] [01] //085

    public static MaplePacket sendHint(String hint, int width, int height) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        if (width < 1) {
            width = hint.getBytes().length * 10;
            if (width < 40) {
                width = 40;
            }
        }
        if (height < 5) {
            height = 5;
        }
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_HINT.getValue());
        mplew.writeMapleAsciiString(hint);
        mplew.writeShort(width);
        mplew.writeShort(height);
        mplew.write(1);

        return mplew.getPacket();
    }


    //聊天招待
    public static MaplePacket messengerInvite(String from, int messengerid) {//招待邀请
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.MESSENGER.getValue());
        mplew.write(0x03);
        mplew.writeMapleAsciiString(from);
        mplew.write(0x05);
        mplew.writeInt(messengerid);
        mplew.write(0x00);

        return mplew.getPacket();
    }

    public static MaplePacket addMessengerPlayer(String from, MapleCharacter chr, int position, int channel) {//招待添加玩家
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.MESSENGER.getValue());
        mplew.write(0x00);
        mplew.write(position);
        addCharLook(mplew, chr, true);
        mplew.writeMapleAsciiString(from);
        mplew.write(channel);
        mplew.write(0x00);

        return mplew.getPacket();
    }

    public static MaplePacket removeMessengerPlayer(int position) {//移除玩家(玩家离开)
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.MESSENGER.getValue());
        mplew.write(0x02);
        mplew.write(position);

        return mplew.getPacket();
    }

    public static MaplePacket updateMessengerPlayer(String from, MapleCharacter chr, int position, int channel) {//更新招待玩家
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.MESSENGER.getValue());
        mplew.write(0x07);
        mplew.write(position);
        addCharLook(mplew, chr, true);
        mplew.writeMapleAsciiString(from);
        mplew.write(channel);
        mplew.write(0x00);

        return mplew.getPacket();
    }

    public static MaplePacket joinMessenger(int position) {//加入招待
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MESSENGER.getValue());
        mplew.write(0x01);
        mplew.write(position);

        return mplew.getPacket();
    }

    public static MaplePacket messengerChat(String text) {//招待聊天
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.MESSENGER.getValue());
        mplew.write(0x06);
        mplew.writeMapleAsciiString(text);

        return mplew.getPacket();
    }

    public static MaplePacket messengerNote(String text, int mode, int mode2) {//招待说明
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.MESSENGER.getValue());
        mplew.write(mode);
        mplew.writeMapleAsciiString(text);
        mplew.write(mode2);

        return mplew.getPacket();
    }

    public static MaplePacket warpCS(MapleClient c) {
        return warpCS1(c, false);
    }

    public static MaplePacket warpMTS(MapleClient c) {
        return warpCS1(c, true);
    }

    //进入商场拍卖1
    public static MaplePacket warpCS1(MapleClient c, boolean MTS) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MapleCharacter chr = c.getPlayer();
        mplew.writeShort(MTS ? SendPacketOpcode.MTS_OPEN.getValue() : SendPacketOpcode.CS_OPEN.getValue());
        mplew.writeLong(-1);
        mplew.writeShort(0);
        mplew.write(new byte[5]);// 093增加
        addCharStats(mplew, chr);//人物信息
        mplew.write(chr.getBuddylist().getCapacity());
        addInventoryInfo(mplew, chr);//装备
        mplew.write(new byte[5]);//093新增
        addSkillRecord(mplew, chr);//技能
        addQuestRecord(mplew, chr);//任务
        addRingInfo(mplew, chr); //戒指
        addTeleportRockRecord(mplew, chr);
        if (chr.getJob().getId() / 100 == 33) {
            mplew.write(50);
            mplew.write(new byte[20]);
        }
        mplew.write(new byte[8]);
        System.out.println("warpCS1");
        return mplew.getPacket();
    }


   //进商城用
    private static void addCharStats2(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeInt(chr.getId()); // 角色ID
        mplew.writeMapleNameString(chr.getName()); //自动填充到13位
        mplew.write(chr.getGender()); // 性别 (0 = 男, 1 = 女)
        mplew.write(chr.getSkinColor().getId()); // 皮肤
        mplew.writeInt(chr.getFace()); // 脸型
        mplew.writeInt(chr.getHair()); // 发型
        mplew.write(chr.getLevel()); // 等级
        mplew.writeShort(chr.getJob().getId()); // job
        mplew.write(new byte[26]);
        addRemainingSp(mplew, chr);
        mplew.write(new byte[12]);
        mplew.writeLong(DateUtil.getFileTimestamp(System.currentTimeMillis()));//系统时间
        mplew.writeInt(chr.getMapId()); // 当前地图ID
        mplew.write(new byte[54]);
    }

    public static MaplePacket warpCS2(MapleClient c, boolean MTS) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行;
        mplew.writeShort(SendPacketOpcode.CS_INTO.getValue());
        mplew.writeMapleAsciiString(c.getPlayer().getClient().getAccountName());
        if (MTS) {
            mplew.writeInt(0);
            mplew.write(HexTool.getByteArrayFromHexString("77 75 68 61 6F 88 13 00 00 07 00 00 00 2C 01 00 00 18 00 00 00 A8 00 00 00 C0 E8 EE 37 C0 E8 CB 01"));
        } else {
            mplew.write(HexTool.getByteArrayFromHexString("4D 00 00 00 57 A5 9B 00 58 A5 9B 00 59 A5 9B 00 5A A5 9B 00 5B A5 9B 00 5C A5 9B 00 5D A5 9B 00 5E A5 9B 00 5F A5 9B 00 63 A5 9B 00 64 A5 9B 00 65 A5 9B 00 66 A5 9B 00 67 A5 9B 00 68 A5 9B 00 69 A5 9B 00 6A A5 9B 00 6B A5 9B 00 6C A5 9B 00 6D A5 9B 00 6E A5 9B 00 6F A5 9B 00 70 A5 9B 00 71 A5 9B 00 72 A5 9B 00 74 A5 9B 00 76 A5 9B 00 77 A5 9B 00 78 A5 9B 00 79 A5 9B 00 7A A5 9B 00 7B A5 9B 00 7C A5 9B 00 7D A5 9B 00 7E A5 9B 00 7F A5 9B 00 80 A5 9B 00 81 A5 9B 00 82 A5 9B 00 83 A5 9B 00 84 A5 9B 00 86 A5 9B 00 88 A5 9B 00 8A A5 9B 00 8B A5 9B 00 8D A5 9B 00 8E A5 9B 00 8F A5 9B 00 90 A5 9B 00 91 A5 9B 00 92 A5 9B 00 94 A5 9B 00 95 A5 9B 00 96 A5 9B 00 98 A5 9B 00 99 A5 9B 00 9A A5 9B 00 9B A5 9B 00 9C A5 9B 00 9D A5 9B 00 9E A5 9B 00 9F A5 9B 00 A2 A5 9B 00 A3 A5 9B 00 A5 A5 9B 00 A6 A5 9B 00 A7 A5 9B 00 A8 A5 9B 00 A9 A5 9B 00 AA A5 9B 00 AB A5 9B 00 AC A5 9B 00 AD A5 9B 00 AE A5 9B 00 AF A5 9B 00 B1 A5 9B 00 B2 A5 9B 00 D9 0E 92 96 98 00 00 08 00 00 03 93 96 98 00 00 08 00 00 03 94 96 98 00 00 08 00 00 03 AA 96 98 00 10 0C 00 00 6C 01 03 AB 96 98 00 10 08 00 00 65 03 AC 96 98 00 10 0C 00 00 6C 01 03 AD 96 98 00 10 00 00 00 65 A3 97 98 00 00 08 00 00 03 A4 97 98 00 00 08 00 00 03 A5 97 98 00 00 08 00 00 03 B4 97 98 00 00 08 00 00 03 87 98 98 00 00 08 00 00 02 A3 98 98 00 00 08 00 00 03 A5 98 98 00 00 08 00 00 02 FE 98 98 00 10 04 00 00 50 01 60 99 98 00 10 0C 00 00 51 01 02 FF 99 98 00 00 08 00 00 02 00 9A 98 00 10 0C 00 00 50 01 02 02 9A 98 00 10 14 00 00 63 01 02 6C 9A 98 00 00 08 00 00 03 6D 9A 98 00 00 08 00 00 03 6E 9A 98 00 00 08 00 00 03 6F 9A 98 00 00 08 00 00 03 70 9A 98 00 00 08 00 00 03 8C 9A 98 00 00 08 00 00 03 8E 9A 98 00 00 08 00 00 03 8F 9A 98 00 00 08 00 00 03 90 9A 98 00 00 08 00 00 03 01 9B 98 00 00 10 00 00 02 17 9B 98 00 10 0C 00 00 50 01 01 27 9B 98 00 10 0C 00 00 50 01 02 4C 9B 98 00 00 08 00 00 02 4F 9B 98 00 00 08 00 00 02 95 9B 98 00 00 08 00 00 02 9D 9B 98 00 00 08 00 00 02 E0 9B 98 00 00 08 00 00 03 E9 9B 98 00 00 08 00 00 03 EE 9B 98 00 00 08 00 00 03 F5 9B 98 00 00 08 00 00 03 F6 9B 98 00 00 08 00 00 03 F7 9B 98 00 00 08 00 00 03 FC 9B 98 00 00 08 00 00 03 FD 9B 98 00 00 08 00 00 03 FE 9B 98 00 00 08 00 00 03 12 9C 98 00 00 08 00 00 03 13 9C 98 00 00 08 00 00 03 14 9C 98 00 00 08 00 00 03 15 9C 98 00 00 08 00 00 03 16 9C 98 00 00 08 00 00 03 1B 9C 98 00 00 08 00 00 03 1C 9C 98 00 00 08 00 00 03 1D 9C 98 00 00 08 00 00 03 1E 9C 98 00 00 08 00 00 03 1F 9C 98 00 00 08 00 00 03 40 9C 98 00 00 08 00 00 03 4D 9C 98 00 00 08 00 00 02 5A 9C 98 00 00 08 00 00 03 5B 9C 98 00 00 08 00 00 02 5C 9C 98 00 10 04 00 00 53 01 97 9C 98 00 10 0C 00 00 56 01 02 A9 9C 98 00 10 00 00 00 5F AB 9C 98 00 10 00 00 00 5F AC 9C 98 00 10 00 00 00 5F AD 9C 98 00 10 00 00 00 5F AE 9C 98 00 10 00 00 00 5F AF 9C 98 00 10 00 00 00 5F B0 9C 98 00 10 00 00 00 5F B1 9C 98 00 10 00 00 00 60 B2 9C 98 00 10 00 00 00 60 B3 9C 98 00 10 00 00 00 60 B4 9C 98 00 10 00 00 00 60 B7 9C 98 00 10 00 00 00 60 B8 9C 98 00 10 00 00 00 5F B9 9C 98 00 10 00 00 00 5F BA 9C 98 00 10 00 00 00 5F BB 9C 98 00 10 00 00 00 5F BD 9C 98 00 10 00 00 00 61 BE 9C 98 00 10 00 00 00 60 BF 9C 98 00 10 00 00 00 61 C0 9C 98 00 10 00 00 00 60 C1 9C 98 00 10 00 00 00 61 C2 9C 98 00 10 00 00 00 61 C3 9C 98 00 10 00 00 00 61 C4 9C 98 00 10 00 00 00 60 C5 9C 98 00 10 00 00 00 61 C6 9C 98 00 10 0C 00 00 6C 01 03 C7 9C 98 00 10 0C 00 00 6C 01 03 C8 9C 98 00 10 08 00 00 5F 02 C9 9C 98 00 10 00 00 00 5F CA 9C 98 00 10 00 00 00 5F CB 9C 98 00 10 00 00 00 5F CC 9C 98 00 10 08 00 00 61 00 CD 9C 98 00 10 08 00 00 61 00 CE 9C 98 00 10 0C 00 00 50 01 02 CF 9C 98 00 00 08 00 00 02 D0 9C 98 00 10 00 00 00 60 D1 9C 98 00 10 00 00 00 60 D2 9C 98 00 10 00 00 00 60 D3 9C 98 00 10 0C 00 00 52 01 02 D4 9C 98 00 10 00 00 00 60 D5 9C 98 00 10 00 00 00 60 D6 9C 98 00 10 00 00 00 60 D7 9C 98 00 10 00 00 00 60 D8 9C 98 00 10 00 00 00 60 D9 9C 98 00 10 00 00 00 60 DA 9C 98 00 10 00 00 00 60 DB 9C 98 00 10 08 00 00 60 02 DC 9C 98 00 10 00 00 00 60 DD 9C 98 00 10 00 00 00 60 DE 9C 98 00 10 00 00 00 60 DF 9C 98 00 10 00 00 00 60 E0 9C 98 00 10 08 00 00 60 02 E1 9C 98 00 10 00 00 00 60 E2 9C 98 00 10 00 00 00 60 E3 9C 98 00 10 00 00 00 60 E4 9C 98 00 10 00 00 00 60 E5 9C 98 00 10 00 00 00 60 E6 9C 98 00 10 00 00 00 60 E7 9C 98 00 10 00 00 00 60 E8 9C 98 00 10 00 00 00 60 E9 9C 98 00 10 00 00 00 60 EA 9C 98 00 10 00 00 00 60 EB 9C 98 00 10 00 00 00 60 EC 9C 98 00 10 00 00 00 60 ED 9C 98 00 10 00 00 00 60 EE 9C 98 00 10 00 00 00 60 EF 9C 98 00 10 00 00 00 60 F0 9C 98 00 00 04 00 00 01 F1 9C 98 00 10 00 00 00 60 F2 9C 98 00 10 00 00 00 60 F3 9C 98 00 10 00 00 00 60 F4 9C 98 00 10 00 00 00 60 F5 9C 98 00 10 00 00 00 60 F6 9C 98 00 10 00 00 00 61 F7 9C 98 00 10 00 00 00 60 F8 9C 98 00 10 08 00 00 61 00 F9 9C 98 00 10 00 00 00 61 FA 9C 98 00 10 00 00 00 60 FB 9C 98 00 10 00 00 00 60 FC 9C 98 00 10 00 00 00 60 FD 9C 98 00 10 00 00 00 61 FE 9C 98 00 10 00 00 00 61 FF 9C 98 00 10 00 00 00 60 00 9D 98 00 10 00 00 00 60 01 9D 98 00 10 00 00 00 60 02 9D 98 00 10 00 00 00 60 03 9D 98 00 10 00 00 00 60 04 9D 98 00 10 00 00 00 61 05 9D 98 00 10 00 00 00 61 06 9D 98 00 10 00 00 00 61 07 9D 98 00 10 08 00 00 61 00 08 9D 98 00 10 08 00 00 61 00 09 9D 98 00 10 00 00 00 60 0A 9D 98 00 10 08 00 00 60 02 0B 9D 98 00 10 00 00 00 60 0C 9D 98 00 10 08 00 00 61 00 0E 9D 98 00 10 00 00 00 60 0F 9D 98 00 10 00 00 00 60 11 9D 98 00 10 00 00 00 62 15 9D 98 00 10 00 00 00 62 1A 9D 98 00 10 08 00 00 61 00 1B 9D 98 00 10 00 00 00 60 1C 9D 98 00 10 00 00 00 60 1D 9D 98 00 10 00 00 00 60 1E 9D 98 00 10 00 00 00 60 1F 9D 98 00 10 00 00 00 60 20 9D 98 00 10 08 00 00 61 02 22 9D 98 00 10 00 00 00 60 23 9D 98 00 10 00 00 00 60 24 9D 98 00 10 00 00 00 60 25 9D 98 00 10 00 00 00 60 26 9D 98 00 10 04 00 00 56 01 27 9D 98 00 10 00 00 00 60 28 9D 98 00 10 00 00 00 60 2A 9D 98 00 10 00 00 00 60 2B 9D 98 00 10 00 00 00 60 2C 9D 98 00 10 08 00 00 62 01 2D 9D 98 00 00 08 00 00 02 2E 9D 98 00 10 08 00 00 61 00 2F 9D 98 00 10 08 00 00 61 00 30 9D 98 00 10 08 00 00 61 00 31 9D 98 00 10 08 00 00 61 00 32 9D 98 00 10 08 00 00 61 00 33 9D 98 00 10 08 00 00 61 00 34 9D 98 00 10 08 00 00 61 00 35 9D 98 00 10 08 00 00 61 00 36 9D 98 00 10 00 00 00 60 37 9D 98 00 10 08 00 00 61 00 38 9D 98 00 10 00 00 00 60 39 9D 98 00 10 00 00 00 60 3A 9D 98 00 10 00 00 00 60 3B 9D 98 00 10 00 00 00 60 3C 9D 98 00 10 00 00 00 60 3D 9D 98 00 10 00 00 00 60 3E 9D 98 00 10 08 00 00 61 00 3F 9D 98 00 10 00 00 00 60 40 9D 98 00 10 00 00 00 60 41 9D 98 00 10 00 00 00 60 42 9D 98 00 10 00 00 00 60 43 9D 98 00 10 00 00 00 60 44 9D 98 00 10 00 00 00 60 45 9D 98 00 10 00 00 00 60 46 9D 98 00 10 00 00 00 60 47 9D 98 00 10 00 00 00 60 48 9D 98 00 10 00 00 00 60 49 9D 98 00 10 08 00 00 60 02 4A 9D 98 00 10 08 00 00 60 00 4B 9D 98 00 10 08 00 00 60 00 4C 9D 98 00 10 04 00 00 53 01 4D 9D 98 00 10 00 00 00 60 4E 9D 98 00 10 00 00 00 60 4F 9D 98 00 10 00 00 00 60 50 9D 98 00 10 00 00 00 60 51 9D 98 00 10 00 00 00 60 52 9D 98 00 10 08 00 00 60 00 53 9D 98 00 10 08 00 00 60 01 54 9D 98 00 10 08 00 00 61 00 55 9D 98 00 10 08 00 00 60 02 56 9D 98 00 10 08 00 00 61 00 57 9D 98 00 10 08 00 00 61 00 58 9D 98 00 10 00 00 00 60 59 9D 98 00 10 08 00 00 61 00 5A 9D 98 00 10 08 00 00 61 00 5B 9D 98 00 10 00 00 00 60 5C 9D 98 00 10 08 00 00 61 00 5D 9D 98 00 10 08 00 00 61 00 5E 9D 98 00 10 08 00 00 60 02 60 9D 98 00 10 00 00 00 61 61 9D 98 00 10 00 00 00 60 62 9D 98 00 10 00 00 00 60 63 9D 98 00 10 00 00 00 60 64 9D 98 00 10 08 00 00 61 00 65 9D 98 00 10 08 00 00 61 00 66 9D 98 00 10 00 00 00 60 67 9D 98 00 10 08 00 00 68 03 68 9D 98 00 10 08 00 00 68 03 69 9D 98 00 10 08 00 00 68 03 6A 9D 98 00 10 00 00 00 60 6B 9D 98 00 10 00 00 00 60 6C 9D 98 00 10 00 00 00 60 6D 9D 98 00 10 08 00 00 5F 02 6E 9D 98 00 10 00 00 00 60 6F 9D 98 00 10 00 00 00 60 70 9D 98 00 10 00 00 00 60 71 9D 98 00 10 00 00 00 60 72 9D 98 00 10 00 00 00 60 73 9D 98 00 10 08 00 00 61 00 74 9D 98 00 10 00 00 00 60 75 9D 98 00 10 00 00 00 60 76 9D 98 00 10 00 00 00 60 77 9D 98 00 10 08 00 00 60 02 79 9D 98 00 10 00 00 00 60 7A 9D 98 00 10 08 00 00 61 00 7B 9D 98 00 10 08 00 00 61 00 7C 9D 98 00 10 00 00 00 60 7D 9D 98 00 10 00 00 00 60 7E 9D 98 00 10 08 00 00 61 00 7F 9D 98 00 10 00 00 00 60 80 9D 98 00 10 08 00 00 61 02 81 9D 98 00 10 00 00 00 60 82 9D 98 00 10 08 00 00 61 00 83 9D 98 00 10 00 00 00 60 84 9D 98 00 10 00 00 00 60 85 9D 98 00 10 0C 00 00 50 01 02 87 9D 98 00 10 00 00 00 61 88 9D 98 00 10 08 00 00 61 00 89 9D 98 00 10 08 00 00 61 00 8A 9D 98 00 10 08 00 00 61 00 8B 9D 98 00 10 08 00 00 60 02 8C 9D 98 00 10 08 00 00 60 02 8D 9D 98 00 10 08 00 00 60 02 8E 9D 98 00 10 08 00 00 60 02 8F 9D 98 00 10 08 00 00 61 02 91 9D 98 00 10 00 00 00 60 92 9D 98 00 10 08 00 00 61 00 93 9D 98 00 10 00 00 00 60 94 9D 98 00 10 00 00 00 60 95 9D 98 00 00 08 00 00 03 96 9D 98 00 00 08 00 00 03 9A 9D 98 00 00 10 00 00 02 9B 9D 98 00 00 08 00 00 03 9C 9D 98 00 00 08 00 00 03 9E 9D 98 00 00 08 00 00 03 9F 9D 98 00 00 08 00 00 03 A0 9D 98 00 10 08 00 00 60 02 A1 9D 98 00 10 00 00 00 60 A2 9D 98 00 00 08 00 00 03 A3 9D 98 00 10 08 00 00 60 02 A4 9D 98 00 10 08 00 00 60 02 A5 9D 98 00 10 00 00 00 60 A6 9D 98 00 10 00 00 00 60 A7 9D 98 00 10 00 00 00 60 A8 9D 98 00 10 00 00 00 60 A9 9D 98 00 10 08 00 00 61 00 AA 9D 98 00 10 08 00 00 60 02 AB 9D 98 00 10 08 00 00 61 00 AC 9D 98 00 10 08 00 00 60 02 AD 9D 98 00 10 08 00 00 61 00 AE 9D 98 00 10 08 00 00 60 02 AF 9D 98 00 10 08 00 00 60 03 B0 9D 98 00 10 08 00 00 60 02 B1 9D 98 00 10 08 00 00 61 03 B2 9D 98 00 00 08 00 00 03 B3 9D 98 00 10 00 00 00 61 B4 9D 98 00 10 00 00 00 60 B5 9D 98 00 10 00 00 00 61 B6 9D 98 00 10 00 00 00 61 B7 9D 98 00 10 00 00 00 61 B8 9D 98 00 10 00 00 00 61 BB 9D 98 00 10 00 00 00 61 BC 9D 98 00 10 00 00 00 61 BD 9D 98 00 10 00 00 00 60 BE 9D 98 00 10 00 00 00 61 BF 9D 98 00 10 08 00 00 60 02 C0 9D 98 00 10 00 00 00 61 C1 9D 98 00 10 08 00 00 60 02 C2 9D 98 00 10 00 00 00 60 C3 9D 98 00 10 00 00 00 60 C4 9D 98 00 10 08 00 00 60 02 C5 9D 98 00 10 00 00 00 60 C6 9D 98 00 10 00 00 00 60 C7 9D 98 00 10 00 00 00 61 C8 9D 98 00 10 00 00 00 61 C9 9D 98 00 10 00 00 00 60 CA 9D 98 00 10 00 00 00 60 CB 9D 98 00 10 00 00 00 60 CC 9D 98 00 10 00 00 00 61 CD 9D 98 00 10 00 00 00 60 CE 9D 98 00 10 00 00 00 61 CF 9D 98 00 10 00 00 00 61 D0 9D 98 00 10 00 00 00 60 D1 9D 98 00 10 08 00 00 60 02 D2 9D 98 00 10 00 00 00 60 D3 9D 98 00 10 00 00 00 60 D4 9D 98 00 10 00 00 00 61 D5 9D 98 00 10 00 00 00 60 D6 9D 98 00 10 00 00 00 61 D7 9D 98 00 10 00 00 00 61 D8 9D 98 00 10 00 00 00 61 D9 9D 98 00 10 00 00 00 61 DA 9D 98 00 10 00 00 00 61 DB 9D 98 00 10 00 00 00 60 DC 9D 98 00 10 00 00 00 61 DD 9D 98 00 10 00 00 00 61 DE 9D 98 00 10 00 00 00 60 DF 9D 98 00 10 00 00 00 60 E0 9D 98 00 10 00 00 00 61 E1 9D 98 00 10 00 00 00 61 E2 9D 98 00 10 00 00 00 61 E3 9D 98 00 10 00 00 00 61 E4 9D 98 00 10 00 00 00 60 E5 9D 98 00 10 00 00 00 61 E6 9D 98 00 10 00 00 00 54 E7 9D 98 00 10 00 00 00 61 E8 9D 98 00 10 00 00 00 60 E9 9D 98 00 10 00 00 00 60 EA 9D 98 00 10 00 00 00 61 EB 9D 98 00 10 00 00 00 61 EC 9D 98 00 10 00 00 00 61 ED 9D 98 00 10 00 00 00 60 EE 9D 98 00 10 00 00 00 61 EF 9D 98 00 10 00 00 00 61 F0 9D 98 00 10 00 00 00 61 F1 9D 98 00 10 00 00 00 61 F2 9D 98 00 10 00 00 00 61 F3 9D 98 00 10 00 00 00 61 F4 9D 98 00 10 00 00 00 61 F5 9D 98 00 10 00 00 00 61 F7 9D 98 00 10 00 00 00 60 F8 9D 98 00 10 00 00 00 61 F9 9D 98 00 10 00 00 00 61 FA 9D 98 00 10 00 00 00 60 FB 9D 98 00 10 00 00 00 61 FC 9D 98 00 10 00 00 00 61 FD 9D 98 00 10 00 00 00 60 FE 9D 98 00 10 00 00 00 60 FF 9D 98 00 10 00 00 00 60 00 9E 98 00 10 00 00 00 61 03 9E 98 00 14 00 00 00 61 08 07 00 00 06 9E 98 00 10 00 00 00 61 07 9E 98 00 10 00 00 00 61 08 9E 98 00 10 14 00 00 63 01 02 09 9E 98 00 10 10 00 00 60 02 0A 9E 98 00 10 10 00 00 60 02 0B 9E 98 00 10 10 00 00 60 02 0C 9E 98 00 10 10 00 00 60 02 0D 9E 98 00 10 14 00 00 63 01 02 0E 9E 98 00 10 0C 00 00 54 01 02 0F 9E 98 00 10 14 00 00 63 01 02 10 9E 98 00 10 00 00 00 61 11 9E 98 00 10 00 00 00 61 15 9E 98 00 10 00 00 00 61 16 9E 98 00 00 04 00 00 01 17 9E 98 00 10 00 00 00 61 18 9E 98 00 10 00 00 00 61 19 9E 98 00 10 04 00 00 50 01 1A 9E 98 00 10 00 00 00 60 1B 9E 98 00 10 00 00 00 60 1C 9E 98 00 10 00 00 00 61 1D 9E 98 00 10 00 00 00 60 1E 9E 98 00 10 00 00 00 60 20 9E 98 00 10 00 00 00 61 22 9E 98 00 10 00 00 00 61 23 9E 98 00 10 00 00 00 60 24 9E 98 00 10 00 00 00 61 25 9E 98 00 10 00 00 00 60 26 9E 98 00 10 00 00 00 61 27 9E 98 00 10 00 00 00 61 28 9E 98 00 10 00 00 00 61 29 9E 98 00 10 00 00 00 61 2A 9E 98 00 10 00 00 00 61 2B 9E 98 00 10 00 00 00 61 2C 9E 98 00 10 00 00 00 61 2D 9E 98 00 10 00 00 00 61 2E 9E 98 00 10 00 00 00 61 2F 9E 98 00 10 00 00 00 61 30 9E 98 00 10 00 00 00 61 31 9E 98 00 10 00 00 00 61 32 9E 98 00 10 00 00 00 61 33 9E 98 00 10 00 00 00 61 34 9E 98 00 10 00 00 00 61 35 9E 98 00 10 00 00 00 61 36 9E 98 00 10 00 00 00 61 37 9E 98 00 10 00 00 00 61 38 9E 98 00 10 00 00 00 61 39 9E 98 00 10 00 00 00 61 3A 9E 98 00 10 00 00 00 61 3B 9E 98 00 10 00 00 00 61 3C 9E 98 00 10 00 00 00 61 3D 9E 98 00 10 00 00 00 61 3E 9E 98 00 10 00 00 00 61 3F 9E 98 00 10 00 00 00 61 40 9E 98 00 10 00 00 00 61 41 9E 98 00 10 00 00 00 61 42 9E 98 00 10 00 00 00 61 43 9E 98 00 10 00 00 00 61 44 9E 98 00 10 08 00 00 61 02 45 9E 98 00 10 00 00 00 61 46 9E 98 00 10 00 00 00 61 47 9E 98 00 00 08 00 00 02 48 9E 98 00 10 00 00 00 61 49 9E 98 00 00 08 00 00 02 4A 9E 98 00 00 08 00 00 02 4B 9E 98 00 00 08 00 00 02 4C 9E 98 00 10 00 00 00 61 4D 9E 98 00 10 00 00 00 61 4E 9E 98 00 00 08 00 00 02 4F 9E 98 00 10 00 00 00 61 50 9E 98 00 10 00 00 00 61 51 9E 98 00 10 00 00 00 61 52 9E 98 00 10 00 00 00 61 53 9E 98 00 10 00 00 00 61 54 9E 98 00 10 04 00 00 50 01 55 9E 98 00 10 00 00 00 61 56 9E 98 00 10 00 00 00 61 57 9E 98 00 10 00 00 00 61 58 9E 98 00 10 08 00 00 61 00 5C 9E 98 00 10 04 00 00 5E 01 5F 9E 98 00 00 08 00 00 00 63 9E 98 00 00 08 00 00 02 67 9E 98 00 10 04 00 00 50 01 69 9E 98 00 00 08 00 00 00 6E 9E 98 00 10 08 00 00 61 00 6F 9E 98 00 10 08 00 00 61 00 70 9E 98 00 10 00 00 00 61 71 9E 98 00 10 00 00 00 61 72 9E 98 00 10 00 00 00 61 76 9E 98 00 10 04 00 00 5B 01 7B 9E 98 00 00 08 00 00 02 7C 9E 98 00 00 08 00 00 02 7D 9E 98 00 10 08 00 00 60 03 7E 9E 98 00 10 08 00 00 60 02 7F 9E 98 00 10 0C 00 00 55 01 02 80 9E 98 00 10 00 00 00 61 81 9E 98 00 10 08 00 00 61 02 82 9E 98 00 10 08 00 00 61 00 83 9E 98 00 10 08 00 00 61 00 86 9E 98 00 10 00 00 00 61 87 9E 98 00 10 08 00 00 61 00 88 9E 98 00 00 08 00 00 02 89 9E 98 00 10 08 00 00 61 00 8A 9E 98 00 10 0C 00 00 59 01 02 8B 9E 98 00 10 00 00 00 61 8C 9E 98 00 10 08 00 00 61 00 8E 9E 98 00 10 00 00 00 60 90 9E 98 00 10 00 00 00 60 91 9E 98 00 10 00 00 00 61 95 9E 98 00 10 00 00 00 60 96 9E 98 00 10 00 00 00 60 97 9E 98 00 10 08 00 00 61 02 98 9E 98 00 00 08 00 00 02 99 9E 98 00 10 00 00 00 61 9A 9E 98 00 10 08 00 00 61 02 A3 9E 98 00 10 08 00 00 61 02 A4 9E 98 00 10 08 00 00 61 02 A5 9E 98 00 10 08 00 00 61 02 AB 9E 98 00 10 00 00 00 60 AC 9E 98 00 10 08 00 00 61 02 A9 9E 98 00 10 08 00 00 60 02 A6 9E 98 00 10 08 00 00 61 02 A7 9E 98 00 10 08 00 00 61 02 A8 9E 98 00 10 08 00 00 61 00 AA 9E 98 00 10 00 00 00 60 AF 9E 98 00 10 04 00 00 4F 01 B0 9E 98 00 10 04 00 00 4F 01 B1 9E 98 00 00 08 00 00 00 B2 9E 98 00 00 08 00 00 00 B4 9E 98 00 10 08 00 00 5F 02 B8 9E 98 00 10 08 00 00 61 00 B9 9E 98 00 10 08 00 00 61 00 BA 9E 98 00 10 08 00 00 61 00 BB 9E 98 00 10 08 00 00 61 00 BC 9E 98 00 10 08 00 00 61 00 BD 9E 98 00 10 04 00 00 60 01 BE 9E 98 00 10 04 00 00 60 01 BF 9E 98 00 10 08 00 00 61 00 C0 9E 98 00 10 08 00 00 32 02 C2 9E 98 00 10 08 00 00 5F 02 C3 9E 98 00 10 00 00 00 5F C4 9E 98 00 10 08 00 00 5F 02 C8 9E 98 00 00 08 00 00 02 CA 9E 98 00 10 00 00 00 5F CB 9E 98 00 10 08 00 00 61 00 CE 9E 98 00 10 08 00 00 61 00 CF 9E 98 00 10 08 00 00 61 02 D0 9E 98 00 10 08 00 00 61 00 D1 9E 98 00 00 08 00 00 02 D2 9E 98 00 10 08 00 00 61 00 D3 9E 98 00 10 00 00 00 61 D4 9E 98 00 10 08 00 00 61 00 D5 9E 98 00 10 08 00 00 5F 02 D6 9E 98 00 10 08 00 00 61 00 D7 9E 98 00 10 08 00 00 61 00 D8 9E 98 00 00 08 00 00 00 D9 9E 98 00 00 08 00 00 00 DA 9E 98 00 10 00 00 00 61 DC 9E 98 00 10 08 00 00 61 00 DD 9E 98 00 10 08 00 00 5F 02 DE 9E 98 00 10 08 00 00 61 00 DF 9E 98 00 10 04 00 00 5F 01 E0 9E 98 00 10 04 00 00 5F 01 E2 9E 98 00 00 08 00 00 00 E3 9E 98 00 00 08 00 00 00 E4 9E 98 00 00 08 00 00 02 E5 9E 98 00 00 08 00 00 02 E6 9E 98 00 10 08 00 00 62 00 E7 9E 98 00 10 08 00 00 61 02 E8 9E 98 00 10 08 00 00 61 00 EA 9E 98 00 10 08 00 00 61 00 EB 9E 98 00 10 04 00 00 5D 01 EC 9E 98 00 10 00 00 00 61 ED 9E 98 00 10 08 00 00 5F 02 EE 9E 98 00 10 08 00 00 61 00 F0 9E 98 00 10 04 00 00 5C 01 F1 9E 98 00 10 08 00 00 62 00 F3 9E 98 00 10 08 00 00 61 00 F4 9E 98 00 00 08 00 00 02 F5 9E 98 00 10 08 00 00 5B 02 F7 9E 98 00 10 00 00 00 5F F8 9E 98 00 10 08 00 00 61 00 F9 9E 98 00 10 00 00 00 61 FA 9E 98 00 10 08 00 00 61 00 FB 9E 98 00 10 08 00 00 61 02 FC 9E 98 00 10 08 00 00 61 00 FD 9E 98 00 10 00 00 00 61 FE 9E 98 00 10 00 00 00 61 FF 9E 98 00 00 04 00 00 01 00 9F 98 00 00 08 00 00 02 03 9F 98 00 10 04 00 00 60 01 04 9F 98 00 10 00 00 00 61 05 9F 98 00 10 08 00 00 61 00 06 9F 98 00 10 08 00 00 61 00 07 9F 98 00 10 08 00 00 61 00 08 9F 98 00 10 08 00 00 61 00 09 9F 98 00 10 08 00 00 61 00 0A 9F 98 00 10 08 00 00 61 00 0B 9F 98 00 10 08 00 00 61 02 0C 9F 98 00 10 00 00 00 61 0D 9F 98 00 10 00 00 00 61 0F 9F 98 00 10 04 00 00 5E 01 12 9F 98 00 10 08 00 00 61 00 13 9F 98 00 10 00 00 00 61 14 9F 98 00 10 00 00 00 61 15 9F 98 00 10 00 00 00 61 16 9F 98 00 10 00 00 00 5F 17 9F 98 00 10 00 00 00 5F 18 9F 98 00 10 08 00 00 61 02 19 9F 98 00 10 08 00 00 61 00 1A 9F 98 00 10 08 00 00 61 00 1B 9F 98 00 10 08 00 00 61 00 1C 9F 98 00 10 00 00 00 5F 1D 9F 98 00 10 08 00 00 61 00 1E 9F 98 00 10 00 00 00 61 1F 9F 98 00 10 00 00 00 61 20 9F 98 00 10 08 00 00 61 02 21 9F 98 00 10 04 00 00 5A 01 22 9F 98 00 10 00 00 00 5F 23 9F 98 00 10 00 00 00 5F 24 9F 98 00 10 00 00 00 61 25 9F 98 00 10 00 00 00 61 26 9F 98 00 00 08 00 00 00 2F 9F 98 00 10 04 00 00 52 01 30 9F 98 00 10 08 00 00 60 02 31 9F 98 00 10 08 00 00 60 02 32 9F 98 00 10 08 00 00 60 02 33 9F 98 00 10 08 00 00 60 02 34 9F 98 00 10 08 00 00 60 02 35 9F 98 00 10 08 00 00 60 00 36 9F 98 00 10 0C 00 00 59 01 02 37 9F 98 00 10 10 00 00 60 02 38 9F 98 00 10 08 00 00 6D 03 39 9F 98 00 10 08 00 00 6D 03 3A 9F 98 00 10 08 00 00 61 02 3B 9F 98 00 10 08 00 00 61 02 3C 9F 98 00 10 08 00 00 61 02 3D 9F 98 00 10 00 00 00 61 3E 9F 98 00 10 00 00 00 61 3F 9F 98 00 10 00 00 00 61 40 9F 98 00 10 08 00 00 61 02 41 9F 98 00 10 08 00 00 61 02 42 9F 98 00 10 00 00 00 61 43 9F 98 00 10 08 00 00 61 02 44 9F 98 00 10 08 00 00 61 02 45 9F 98 00 10 08 00 00 61 02 46 9F 98 00 10 00 00 00 61 47 9F 98 00 10 08 00 00 61 00 48 9F 98 00 10 08 00 00 61 02 49 9F 98 00 10 08 00 00 61 02 4A 9F 98 00 10 0C 00 00 5A 01 02 4B 9F 98 00 10 0C 00 00 5A 01 02 4C 9F 98 00 10 08 00 00 61 02 4D 9F 98 00 10 00 00 00 61 4E 9F 98 00 10 08 00 00 61 02 4F 9F 98 00 10 08 00 00 61 02 50 9F 98 00 10 08 00 00 61 02 51 9F 98 00 10 08 00 00 61 02 52 9F 98 00 10 08 00 00 61 02 53 9F 98 00 10 0C 00 00 57 01 02 54 9F 98 00 10 08 00 00 61 02 55 9F 98 00 10 08 00 00 61 02 56 9F 98 00 10 08 00 00 61 02 57 9F 98 00 10 00 00 00 61 58 9F 98 00 10 00 00 00 61 59 9F 98 00 14 0C 00 00 67 B8 0B 00 00 01 01 5A 9F 98 00 10 08 00 00 61 03 5B 9F 98 00 10 08 00 00 61 03 5C 9F 98 00 10 08 00 00 61 00 5D 9F 98 00 10 08 00 00 61 00 5E 9F 98 00 10 08 00 00 61 03 5F 9F 98 00 10 00 00 00 61 60 9F 98 00 10 08 00 00 61 02 61 9F 98 00 10 00 00 00 61 62 9F 98 00 10 08 00 00 61 03 63 9F 98 00 10 08 00 00 61 03 64 9F 98 00 10 08 00 00 61 03 65 9F 98 00 10 08 00 00 61 02 66 9F 98 00 30 E8 00 00 61 01 00 03 00 00 00 00 00 00 67 9F 98 00 10 08 00 00 61 03 68 9F 98 00 10 08 00 00 62 02 69 9F 98 00 10 08 00 00 62 00 6A 9F 98 00 10 0C 00 00 62 01 02 6B 9F 98 00 10 08 00 00 62 00 6C 9F 98 00 10 04 00 00 62 01 6D 9F 98 00 10 08 00 00 62 02 6E 9F 98 00 10 08 00 00 62 02 6F 9F 98 00 10 08 00 00 62 02 70 9F 98 00 10 04 00 00 61 01 71 9F 98 00 10 08 00 00 62 02 72 9F 98 00 10 00 00 00 62 73 9F 98 00 10 00 00 00 62 74 9F 98 00 10 08 00 00 62 02 75 9F 98 00 10 08 00 00 62 02 76 9F 98 00 10 08 00 00 62 02 77 9F 98 00 10 08 00 00 62 02 78 9F 98 00 10 00 00 00 62 79 9F 98 00 10 08 00 00 62 02 7A 9F 98 00 10 08 00 00 62 02 7B 9F 98 00 10 08 00 00 62 02 7C 9F 98 00 10 08 00 00 62 02 7D 9F 98 00 10 08 00 00 62 02 7E 9F 98 00 10 0C 00 00 5D 01 02 7F 9F 98 00 10 08 00 00 62 02"));
            mplew.write(HexTool.getByteArrayFromHexString("80 9F 98 00 10 0C 00 00 58 01 02 81 9F 98 00 10 08 00 00 62 02 82 9F 98 00 10 0C 00 00 59 01 02 83 9F 98 00 10 08 00 00 62 02 84 9F 98 00 10 08 00 00 62 02 85 9F 98 00 10 08 00 00 62 02 86 9F 98 00 10 08 00 00 62 02 87 9F 98 00 10 08 00 00 62 02 88 9F 98 00 10 08 00 00 62 03 89 9F 98 00 10 0C 00 00 67 01 03 8A 9F 98 00 10 0C 00 00 67 01 03 8B 9F 98 00 10 0C 00 00 50 01 03 8C 9F 98 00 10 0C 00 00 55 01 02 8D 9F 98 00 10 08 00 00 62 02 8E 9F 98 00 10 08 00 00 62 00 8F 9F 98 00 10 08 00 00 62 00 90 9F 98 00 10 08 00 00 62 00 91 9F 98 00 10 08 00 00 62 00 92 9F 98 00 00 0C 00 00 01 02 93 9F 98 00 00 08 00 00 02 94 9F 98 00 00 08 00 00 00 95 9F 98 00 10 0C 00 00 66 01 02 96 9F 98 00 00 08 00 00 00 9B 9F 98 00 10 0C 00 00 66 01 02 9C 9F 98 00 10 0C 00 00 66 01 02 9D 9F 98 00 00 08 00 00 00 9E 9F 98 00 00 08 00 00 00 9F 9F 98 00 00 08 00 00 00 A0 9F 98 00 10 08 00 00 65 02 A1 9F 98 00 10 08 00 00 65 02 A2 9F 98 00 10 0C 00 00 65 01 02 A3 9F 98 00 10 0C 00 00 65 01 02 A4 9F 98 00 00 08 00 00 00 A5 9F 98 00 10 00 00 00 67 A6 9F 98 00 10 04 00 00 66 01 A7 9F 98 00 00 08 00 00 00 A8 9F 98 00 00 08 00 00 00 A9 9F 98 00 00 0C 00 00 01 02 AA 9F 98 00 00 08 00 00 00 AB 9F 98 00 00 0C 00 00 01 02 AC 9F 98 00 00 08 00 00 00 AD 9F 98 00 00 08 00 00 00 AE 9F 98 00 10 0C 00 00 6B 01 00 AF 9F 98 00 00 08 00 00 00 B0 9F 98 00 00 08 00 00 00 B1 9F 98 00 10 0C 00 00 6B 01 00 B2 9F 98 00 00 0C 00 00 01 02 B3 9F 98 00 10 0C 00 00 6B 01 00 B4 9F 98 00 00 08 00 00 00 B5 9F 98 00 00 08 00 00 00 B6 9F 98 00 00 08 00 00 00 B7 9F 98 00 00 08 00 00 00 B8 9F 98 00 00 08 00 00 00 B9 9F 98 00 00 08 00 00 00 BA 9F 98 00 00 08 00 00 00 BB 9F 98 00 00 08 00 00 00 BC 9F 98 00 00 08 00 00 00 BD 9F 98 00 00 08 00 00 00 BE 9F 98 00 00 08 00 00 00 BF 9F 98 00 00 08 00 00 00 C0 9F 98 00 00 08 00 00 00 C1 9F 98 00 00 08 00 00 00 C2 9F 98 00 00 08 00 00 00 C3 9F 98 00 00 08 00 00 00 C4 9F 98 00 00 08 00 00 00 C5 9F 98 00 10 04 00 00 68 01 C6 9F 98 00 10 04 00 00 68 01 C7 9F 98 00 10 04 00 00 68 01 C8 9F 98 00 10 04 00 00 68 01 C9 9F 98 00 10 0C 00 00 68 01 03 CA 9F 98 00 10 0C 00 00 68 01 03 CB 9F 98 00 10 0C 00 00 68 01 03 CC 9F 98 00 00 0C 00 00 01 02 CD 9F 98 00 00 08 00 00 00 CE 9F 98 00 00 0C 00 00 01 02 CF 9F 98 00 00 08 00 00 00 D0 9F 98 00 10 0C 00 00 68 01 03 D1 9F 98 00 00 08 00 00 00 D2 9F 98 00 00 08 00 00 00 D3 9F 98 00 00 08 00 00 00 D4 9F 98 00 10 08 00 00 6A 03 D5 9F 98 00 10 08 00 00 6A 03 D6 9F 98 00 10 08 00 00 69 00 D7 9F 98 00 10 08 00 00 69 00 D8 9F 98 00 10 08 00 00 6A 03 D9 9F 98 00 10 08 00 00 6A 03 DA 9F 98 00 10 08 00 00 69 03 DB 9F 98 00 10 08 00 00 69 03 DC 9F 98 00 10 08 00 00 69 00 DD 9F 98 00 10 08 00 00 6A 03 DE 9F 98 00 10 08 00 00 6A 03 DF 9F 98 00 10 08 00 00 6A 03 E0 9F 98 00 14 0C 00 00 69 F0 00 00 00 01 01 E1 9F 98 00 14 0C 00 00 69 B0 04 00 00 01 01 E2 9F 98 00 14 08 00 00 69 80 0C 00 00 00 E3 9F 98 00 14 0C 00 00 69 D0 07 00 00 01 01 B4 1D 9A 00 00 08 00 00 03 AD 1F 9A 00 10 00 00 00 62 AE 1F 9A 00 10 00 00 00 62 AF 1F 9A 00 10 00 00 00 62 B0 1F 9A 00 10 00 00 00 62 B1 1F 9A 00 10 00 00 00 62 B2 1F 9A 00 10 00 00 00 62 B3 1F 9A 00 10 00 00 00 62 B4 1F 9A 00 10 00 00 00 62 B5 1F 9A 00 10 00 00 00 62 B6 1F 9A 00 10 00 00 00 62 B7 1F 9A 00 10 00 00 00 62 B8 1F 9A 00 10 00 00 00 62 B9 1F 9A 00 10 00 00 00 62 BA 1F 9A 00 10 00 00 00 62 BB 1F 9A 00 10 00 00 00 62 BC 1F 9A 00 10 00 00 00 62 BD 1F 9A 00 10 00 00 00 62 BE 1F 9A 00 10 00 00 00 62 BF 1F 9A 00 10 00 00 00 62 C0 1F 9A 00 10 00 00 00 62 C1 1F 9A 00 10 00 00 00 62 C2 1F 9A 00 10 00 00 00 62 C3 1F 9A 00 10 00 00 00 62 C4 1F 9A 00 10 00 00 00 62 C5 1F 9A 00 10 00 00 00 62 C6 1F 9A 00 10 00 00 00 62 C7 1F 9A 00 10 00 00 00 62 C8 1F 9A 00 10 00 00 00 62 C9 1F 9A 00 10 00 00 00 62 CA 1F 9A 00 10 00 00 00 62 CB 1F 9A 00 10 00 00 00 62 CC 1F 9A 00 10 00 00 00 62 CD 1F 9A 00 10 00 00 00 62 CE 1F 9A 00 00 04 00 00 01 CF 1F 9A 00 00 04 00 00 01 D0 1F 9A 00 00 04 00 00 01 D1 1F 9A 00 00 04 00 00 01 D2 1F 9A 00 00 04 00 00 01 D3 1F 9A 00 00 04 00 00 01 D4 1F 9A 00 00 04 00 00 01 D5 1F 9A 00 00 04 00 00 01 D6 1F 9A 00 00 04 00 00 01 D7 1F 9A 00 00 04 00 00 01 D8 1F 9A 00 00 04 00 00 01 D9 1F 9A 00 00 04 00 00 01 DA 1F 9A 00 00 04 00 00 01 DB 1F 9A 00 00 04 00 00 01 DC 1F 9A 00 00 04 00 00 01 DD 1F 9A 00 00 04 00 00 01 DE 1F 9A 00 00 04 00 00 01 DF 1F 9A 00 00 04 00 00 01 E0 1F 9A 00 00 04 00 00 01 E1 1F 9A 00 00 04 00 00 01 E2 1F 9A 00 00 04 00 00 01 E3 1F 9A 00 00 04 00 00 01 E4 1F 9A 00 00 04 00 00 01 E5 1F 9A 00 00 04 00 00 01 E6 1F 9A 00 00 04 00 00 01 E7 1F 9A 00 00 04 00 00 01 E8 1F 9A 00 00 04 00 00 01 E9 1F 9A 00 00 04 00 00 01 EA 1F 9A 00 00 04 00 00 01 EB 1F 9A 00 00 04 00 00 01 EC 1F 9A 00 00 04 00 00 01 ED 1F 9A 00 00 04 00 00 01 EE 1F 9A 00 00 04 00 00 01 EF 1F 9A 00 00 04 00 00 01 F0 1F 9A 00 00 04 00 00 01 F1 1F 9A 00 00 04 00 00 01 F2 1F 9A 00 00 04 00 00 01 F3 1F 9A 00 00 04 00 00 01 F4 1F 9A 00 00 04 00 00 01 F5 1F 9A 00 00 04 00 00 01 F6 1F 9A 00 00 04 00 00 01 F7 1F 9A 00 00 04 00 00 01 F8 1F 9A 00 00 04 00 00 01 F9 1F 9A 00 00 04 00 00 01 FA 1F 9A 00 00 04 00 00 01 FB 1F 9A 00 00 04 00 00 01 FC 1F 9A 00 00 04 00 00 01 FD 1F 9A 00 00 04 00 00 01 FE 1F 9A 00 00 04 00 00 01 FF 1F 9A 00 00 04 00 00 01 00 20 9A 00 00 04 00 00 01 01 20 9A 00 00 04 00 00 01 02 20 9A 00 00 04 00 00 01 03 20 9A 00 00 04 00 00 01 04 20 9A 00 00 04 00 00 01 05 20 9A 00 00 04 00 00 01 06 20 9A 00 00 04 00 00 01 07 20 9A 00 00 04 00 00 01 08 20 9A 00 00 04 00 00 01 09 20 9A 00 00 04 00 00 01 0A 20 9A 00 00 04 00 00 01 0B 20 9A 00 00 04 00 00 01 0C 20 9A 00 00 04 00 00 01 0D 20 9A 00 00 04 00 00 01 0E 20 9A 00 00 04 00 00 01 0F 20 9A 00 00 04 00 00 01 10 20 9A 00 00 04 00 00 01 11 20 9A 00 00 04 00 00 01 12 20 9A 00 00 04 00 00 01 13 20 9A 00 00 04 00 00 01 14 20 9A 00 00 04 00 00 01 15 20 9A 00 00 04 00 00 01 16 20 9A 00 00 04 00 00 01 17 20 9A 00 00 04 00 00 01 18 20 9A 00 00 04 00 00 01 19 20 9A 00 00 04 00 00 01 1A 20 9A 00 00 04 00 00 01 1B 20 9A 00 00 04 00 00 01 1C 20 9A 00 00 04 00 00 01 1D 20 9A 00 00 04 00 00 01 1E 20 9A 00 00 04 00 00 01 1F 20 9A 00 00 04 00 00 01 20 20 9A 00 00 04 00 00 01 21 20 9A 00 00 04 00 00 01 22 20 9A 00 00 04 00 00 01 23 20 9A 00 00 04 00 00 01 24 20 9A 00 00 04 00 00 01 25 20 9A 00 00 04 00 00 01 26 20 9A 00 00 04 00 00 01 27 20 9A 00 00 04 00 00 01 28 20 9A 00 00 04 00 00 01 29 20 9A 00 00 04 00 00 01 2A 20 9A 00 00 04 00 00 01 2B 20 9A 00 00 04 00 00 01 2C 20 9A 00 00 04 00 00 01 2D 20 9A 00 00 04 00 00 01 2E 20 9A 00 00 04 00 00 01 2F 20 9A 00 00 04 00 00 01 C0 A3 9B 00 00 08 00 00 04 C1 A3 9B 00 00 08 00 00 04 C2 A3 9B 00 00 08 00 00 04 C3 A3 9B 00 00 08 00 00 04 C4 A3 9B 00 00 08 00 00 04 C5 A3 9B 00 00 08 00 00 04 C6 A3 9B 00 00 08 00 00 04 C7 A3 9B 00 00 08 00 00 04 C8 A3 9B 00 00 08 00 00 04 C9 A3 9B 00 00 08 00 00 04 CA A3 9B 00 00 08 00 00 04 CB A3 9B 00 00 08 00 00 04 CC A3 9B 00 00 08 00 00 04 CD A3 9B 00 00 08 00 00 04 CE A3 9B 00 00 08 00 00 04 CF A3 9B 00 00 08 00 00 04 D0 A3 9B 00 00 08 00 00 04 D1 A3 9B 00 00 08 00 00 04 D2 A3 9B 00 00 08 00 00 04 D3 A3 9B 00 00 08 00 00 04 D4 A3 9B 00 00 08 00 00 04 D5 A3 9B 00 00 08 00 00 04 D6 A3 9B 00 00 08 00 00 04 D7 A3 9B 00 00 08 00 00 04 D8 A3 9B 00 00 08 00 00 04 D9 A3 9B 00 00 08 00 00 04 DA A3 9B 00 00 08 00 00 04 DB A3 9B 00 00 08 00 00 04 DC A3 9B 00 00 08 00 00 04 DD A3 9B 00 00 08 00 00 04 DE A3 9B 00 00 08 00 00 04 DF A3 9B 00 00 08 00 00 04 E0 A3 9B 00 00 08 00 00 04 E1 A3 9B 00 00 08 00 00 04 E2 A3 9B 00 00 08 00 00 04 E3 A3 9B 00 00 08 00 00 04 E4 A3 9B 00 00 08 00 00 04 E5 A3 9B 00 00 08 00 00 04 E6 A3 9B 00 00 08 00 00 04 E7 A3 9B 00 00 08 00 00 04 E8 A3 9B 00 00 08 00 00 04 E9 A3 9B 00 00 08 00 00 04 EA A3 9B 00 00 08 00 00 04 EB A3 9B 00 00 08 00 00 04 EC A3 9B 00 00 08 00 00 04 ED A3 9B 00 00 08 00 00 04 EE A3 9B 00 00 08 00 00 04 EF A3 9B 00 00 08 00 00 04 F0 A3 9B 00 00 08 00 00 04 F1 A3 9B 00 00 08 00 00 04 F2 A3 9B 00 00 08 00 00 04 F3 A3 9B 00 00 08 00 00 04 F4 A3 9B 00 00 08 00 00 04 F5 A3 9B 00 00 08 00 00 04 F6 A3 9B 00 00 08 00 00 04 F7 A3 9B 00 00 08 00 00 04 F8 A3 9B 00 00 08 00 00 04 F9 A3 9B 00 00 08 00 00 04 FA A3 9B 00 00 08 00 00 04 FB A3 9B 00 00 08 00 00 04 FC A3 9B 00 00 08 00 00 04 FD A3 9B 00 00 08 00 00 04 FE A3 9B 00 00 08 00 00 04 FF A3 9B 00 00 08 00 00 04 00 A4 9B 00 00 08 00 00 04 01 A4 9B 00 00 08 00 00 04 02 A4 9B 00 00 08 00 00 04 03 A4 9B 00 00 08 00 00 04 04 A4 9B 00 00 08 00 00 04 05 A4 9B 00 00 08 00 00 04 06 A4 9B 00 00 08 00 00 04 07 A4 9B 00 00 08 00 00 04 08 A4 9B 00 00 08 00 00 04 09 A4 9B 00 00 08 00 00 04 0A A4 9B 00 00 08 00 00 04 0B A4 9B 00 00 08 00 00 04 0C A4 9B 00 00 08 00 00 04 0D A4 9B 00 00 08 00 00 04 0E A4 9B 00 00 08 00 00 04 0F A4 9B 00 00 08 00 00 04 10 A4 9B 00 00 08 00 00 04 11 A4 9B 00 00 08 00 00 04 12 A4 9B 00 00 08 00 00 04 13 A4 9B 00 00 08 00 00 04 14 A4 9B 00 00 08 00 00 04 15 A4 9B 00 00 08 00 00 04 16 A4 9B 00 00 08 00 00 04 17 A4 9B 00 00 08 00 00 04 18 A4 9B 00 00 08 00 00 04 19 A4 9B 00 00 08 00 00 04 1A A4 9B 00 00 08 00 00 04 1B A4 9B 00 00 08 00 00 04 1C A4 9B 00 00 08 00 00 04 1D A4 9B 00 00 08 00 00 04 1E A4 9B 00 00 08 00 00 04 1F A4 9B 00 00 08 00 00 04 20 A4 9B 00 00 08 00 00 04 21 A4 9B 00 00 08 00 00 04 22 A4 9B 00 00 08 00 00 04 23 A4 9B 00 00 08 00 00 04 24 A4 9B 00 00 08 00 00 04 25 A4 9B 00 00 08 00 00 04 26 A4 9B 00 00 08 00 00 04 27 A4 9B 00 00 08 00 00 04 28 A4 9B 00 00 08 00 00 04 29 A4 9B 00 00 08 00 00 04 2A A4 9B 00 00 08 00 00 04 2B A4 9B 00 00 08 00 00 04 2C A4 9B 00 00 08 00 00 04 2D A4 9B 00 00 08 00 00 04 2E A4 9B 00 00 08 00 00 04 2F A4 9B 00 00 08 00 00 04 30 A4 9B 00 00 08 00 00 04 31 A4 9B 00 00 08 00 00 04 32 A4 9B 00 00 08 00 00 04 33 A4 9B 00 00 08 00 00 04 34 A4 9B 00 00 08 00 00 04 35 A4 9B 00 00 08 00 00 04 36 A4 9B 00 00 08 00 00 04 37 A4 9B 00 00 08 00 00 04 38 A4 9B 00 00 08 00 00 04 39 A4 9B 00 00 08 00 00 04 3A A4 9B 00 00 08 00 00 04 3B A4 9B 00 00 08 00 00 04 3C A4 9B 00 00 08 00 00 04 3D A4 9B 00 00 08 00 00 04 3E A4 9B 00 00 08 00 00 04 3F A4 9B 00 00 08 00 00 04 40 A4 9B 00 00 08 00 00 04 41 A4 9B 00 00 08 00 00 04 42 A4 9B 00 00 08 00 00 04 43 A4 9B 00 00 08 00 00 04 44 A4 9B 00 00 08 00 00 04 45 A4 9B 00 00 08 00 00 04 46 A4 9B 00 00 08 00 00 04 47 A4 9B 00 00 08 00 00 04 48 A4 9B 00 00 08 00 00 04 49 A4 9B 00 00 08 00 00 04 4A A4 9B 00 00 08 00 00 04 4B A4 9B 00 00 08 00 00 04 4C A4 9B 00 00 08 00 00 04 4D A4 9B 00 00 08 00 00 04 4E A4 9B 00 00 08 00 00 04 4F A4 9B 00 00 08 00 00 04 50 A4 9B 00 00 08 00 00 04 51 A4 9B 00 00 08 00 00 04 52 A4 9B 00 00 08 00 00 04 53 A4 9B 00 00 08 00 00 04 54 A4 9B 00 00 08 00 00 04 55 A4 9B 00 00 08 00 00 04 56 A4 9B 00 00 08 00 00 04 57 A4 9B 00 00 08 00 00 04 58 A4 9B 00 00 08 00 00 04 59 A4 9B 00 00 08 00 00 04 5A A4 9B 00 00 08 00 00 04 5B A4 9B 00 00 08 00 00 04 5C A4 9B 00 00 08 00 00 04 5D A4 9B 00 00 08 00 00 04 5E A4 9B 00 00 08 00 00 04 5F A4 9B 00 00 08 00 00 04 60 A4 9B 00 00 08 00 00 04 61 A4 9B 00 00 08 00 00 04 62 A4 9B 00 00 08 00 00 04 63 A4 9B 00 00 08 00 00 04 64 A4 9B 00 00 08 00 00 04 65 A4 9B 00 00 08 00 00 04 66 A4 9B 00 00 08 00 00 04 67 A4 9B 00 00 08 00 00 04 68 A4 9B 00 00 08 00 00 04 69 A4 9B 00 00 08 00 00 04 6A A4 9B 00 00 08 00 00 04 6B A4 9B 00 00 08 00 00 04 6C A4 9B 00 00 08 00 00 04 6D A4 9B 00 00 08 00 00 04 6E A4 9B 00 00 08 00 00 04 6F A4 9B 00 00 08 00 00 04 70 A4 9B 00 00 08 00 00 04 71 A4 9B 00 00 08 00 00 04 72 A4 9B 00 00 08 00 00 04 73 A4 9B 00 00 08 00 00 04 74 A4 9B 00 00 08 00 00 04 75 A4 9B 00 00 08 00 00 04 76 A4 9B 00 00 08 00 00 04 77 A4 9B 00 00 08 00 00 04 78 A4 9B 00 00 08 00 00 04 79 A4 9B 00 00 08 00 00 04 7A A4 9B 00 00 08 00 00 04 7B A4 9B 00 00 08 00 00 04 7C A4 9B 00 00 08 00 00 04 7D A4 9B 00 00 08 00 00 04 7E A4 9B 00 00 08 00 00 04 7F A4 9B 00 00 08 00 00 04 80 A4 9B 00 00 08 00 00 04 81 A4 9B 00 00 08 00 00 04 82 A4 9B 00 00 08 00 00 04 83 A4 9B 00 00 08 00 00 04 84 A4 9B 00 00 08 00 00 04 85 A4 9B 00 00 08 00 00 04 86 A4 9B 00 00 08 00 00 04 87 A4 9B 00 00 08 00 00 04 88 A4 9B 00 00 08 00 00 04 89 A4 9B 00 00 08 00 00 04 8A A4 9B 00 00 08 00 00 04 8B A4 9B 00 00 08 00 00 04 8C A4 9B 00 00 08 00 00 04 8D A4 9B 00 00 08 00 00 04 8E A4 9B 00 00 08 00 00 04 8F A4 9B 00 00 08 00 00 04 90 A4 9B 00 00 08 00 00 04 91 A4 9B 00 00 08 00 00 04 92 A4 9B 00 00 08 00 00 04 93 A4 9B 00 00 08 00 00 04 94 A4 9B 00 00 08 00 00 04 95 A4 9B 00 00 08 00 00 04 96 A4 9B 00 00 08 00 00 04 97 A4 9B 00 00 08 00 00 04 98 A4 9B 00 00 08 00 00 04 99 A4 9B 00 00 08 00 00 04 9A A4 9B 00 00 08 00 00 04 9B A4 9B 00 00 08 00 00 04 9C A4 9B 00 00 08 00 00 04 9D A4 9B 00 00 08 00 00 04 9E A4 9B 00 00 08 00 00 04 9F A4 9B 00 00 08 00 00 04 A0 A4 9B 00 00 08 00 00 04 A1 A4 9B 00 00 08 00 00 04 A2 A4 9B 00 00 08 00 00 04 A3 A4 9B 00 00 08 00 00 04 A4 A4 9B 00 00 08 00 00 04 A5 A4 9B 00 00 08 00 00 04 A6 A4 9B 00 00 08 00 00 04 A7 A4 9B 00 00 08 00 00 04 A8 A4 9B 00 00 08 00 00 04 A9 A4 9B 00 00 08 00 00 04 AA A4 9B 00 00 08 00 00 04 AB A4 9B 00 00 08 00 00 04 AC A4 9B 00 00 08 00 00 04 AD A4 9B 00 00 08 00 00 04 AE A4 9B 00 00 08 00 00 04 AF A4 9B 00 00 08 00 00 04 B0 A4 9B 00 00 08 00 00 04 B1 A4 9B 00 00 08 00 00 04 B2 A4 9B 00 00 08 00 00 04 B3 A4 9B 00 00 08 00 00 04 B4 A4 9B 00 00 08 00 00 04 B5 A4 9B 00 00 08 00 00 04 B6 A4 9B 00 00 08 00 00 04 B7 A4 9B 00 00 08 00 00 04 B8 A4 9B 00 00 08 00 00 04 B9 A4 9B 00 00 08 00 00 04 BA A4 9B 00 00 08 00 00 04 BB A4 9B 00 00 08 00 00 04 BC A4 9B 00 00 08 00 00 04 BD A4 9B 00 00 08 00 00 04 BE A4 9B 00 00 08 00 00 04 BF A4 9B 00 00 08 00 00 04 C0 A4 9B 00 00 08 00 00 04 C1 A4 9B 00 00 08 00 00 04 C2 A4 9B 00 00 08 00 00 04 C3 A4 9B 00 00 08 00 00 04 C4 A4 9B 00 00 08 00 00 04 C5 A4 9B 00 00 08 00 00 04 C6 A4 9B 00 00 08 00 00 04 C7 A4 9B 00 00 08 00 00 04 C8 A4 9B 00 00 08 00 00 04 C9 A4 9B 00 00 08 00 00 04 CA A4 9B 00 00 08 00 00 04 CB A4 9B 00 00 08 00 00 04 CC A4 9B 00 00 08 00 00 04 CD A4 9B 00 00 08 00 00 04 CE A4 9B 00 00 08 00 00 04 CF A4 9B 00 00 08 00 00 04 D0 A4 9B 00 00 08 00 00 04 D1 A4 9B 00 00 08 00 00 04 D2 A4 9B 00 00 08 00 00 04 D3 A4 9B 00 00 08 00 00 04 D4 A4 9B 00 00 08 00 00 04 D5 A4 9B 00 00 08 00 00 04 D6 A4 9B 00 00 08 00 00 04 D7 A4 9B 00 00 08 00 00 04 D8 A4 9B 00 00 08 00 00 04 D9 A4 9B 00 00 08 00 00 04 DA A4 9B 00 00 08 00 00 04 DB A4 9B 00 00 08 00 00 04 DC A4 9B 00 00 08 00 00 04 DD A4 9B 00 00 08 00 00 04 DE A4 9B 00 00 08 00 00 04 DF A4 9B 00 00 08 00 00 04 E0 A4 9B 00 00 08 00 00 04 E1 A4 9B 00 00 08 00 00 04 E2 A4 9B 00 00 08 00 00 04 E3 A4 9B 00 00 08 00 00 04 E4 A4 9B 00 00 08 00 00 04 E5 A4 9B 00 00 08 00 00 04 E6 A4 9B 00 00 08 00 00 04 E7 A4 9B 00 00 08 00 00 04 E8 A4 9B 00 00 08 00 00 04 E9 A4 9B 00 00 08 00 00 04 EA A4 9B 00 00 08 00 00 04 EB A4 9B 00 00 08 00 00 04 EC A4 9B 00 00 08 00 00 04 ED A4 9B 00 00 08 00 00 04 EE A4 9B 00 00 08 00 00 04 EF A4 9B 00 00 08 00 00 04 F0 A4 9B 00 00 08 00 00 04 F1 A4 9B 00 00 08 00 00 04 F2 A4 9B 00 00 08 00 00 04 F3 A4 9B 00 00 08 00 00 04 F4 A4 9B 00 00 08 00 00 04 F5 A4 9B 00 00 08 00 00 04 F6 A4 9B 00 00 08 00 00 04 F7 A4 9B 00 00 08 00 00 04 F8 A4 9B 00 00 08 00 00 04 F9 A4 9B 00 00 08 00 00 04 FA A4 9B 00 00 08 00 00 04 FB A4 9B 00 00 08 00 00 04 FC A4 9B 00 00 08 00 00 04 FD A4 9B 00 00 08 00 00 04 FE A4 9B 00 00 08 00 00 04 FF A4 9B 00 00 08 00 00 04 00 A5 9B 00 00 08 00 00 04 01 A5 9B 00 00 08 00 00 04 02 A5 9B 00 00 08 00 00 04 03 A5 9B 00 00 08 00 00 04 04 A5 9B 00 00 08 00 00 04 05 A5 9B 00 00 08 00 00 04 06 A5 9B 00 00 08 00 00 04 07 A5 9B 00 00 08 00 00 04 08 A5 9B 00 00 08 00 00 04 09 A5 9B 00 00 08 00 00 04 0A A5 9B 00 00 08 00 00 04 0B A5 9B 00 00 08 00 00 04 0C A5 9B 00 00 08 00 00 04 0D A5 9B 00 00 08 00 00 04 0E A5 9B 00 00 08 00 00 04 0F A5 9B 00 00 08 00 00 04 10 A5 9B 00 00 08 00 00 04 11 A5 9B 00 00 08 00 00 04 12 A5 9B 00 00 08 00 00 04 13 A5 9B 00 00 08 00 00 04 14 A5 9B 00 00 08 00 00 04 15 A5 9B 00 00 08 00 00 04 16 A5 9B 00 00 08 00 00 04 17 A5 9B 00 00 08 00 00 04 18 A5 9B 00 00 08 00 00 04 19 A5 9B 00 00 08 00 00 04 1A A5 9B 00 00 08 00 00 04 1B A5 9B 00 00 08 00 00 04 1C A5 9B 00 00 08 00 00 04 1D A5 9B 00 00 08 00 00 04 1E A5 9B 00 00 08 00 00 04 1F A5 9B 00 00 08 00 00 04 20 A5 9B 00 00 08 00 00 04 21 A5 9B 00 00 08 00 00 04 22 A5 9B 00 00 08 00 00 04 23 A5 9B 00 00 08 00 00 04 24 A5 9B 00 00 08 00 00 04 25 A5 9B 00 00 08 00 00 04 26 A5 9B 00 00 08 00 00 04 27 A5 9B 00 00 08 00 00 04 28 A5 9B 00 00 08 00 00 04 29 A5 9B 00 00 08 00 00 04 2A A5 9B 00 00 08 00 00 04 2B A5 9B 00 00 08 00 00 04 2C A5 9B 00 00 08 00 00 04 2D A5 9B 00 00 08 00 00 04 2E A5 9B 00 00 08 00 00 04 2F A5 9B 00 00 08 00 00 04 30 A5 9B 00 00 08 00 00 04 31 A5 9B 00 00 08 00 00 04 32 A5 9B 00 00 08 00 00 04 33 A5 9B 00 00 08 00 00 04 34 A5 9B 00 00 08 00 00 04 35 A5 9B 00 00 08 00 00 04 36 A5 9B 00 00 08 00 00 04 37 A5 9B 00 00 08 00 00 04 38 A5 9B 00 00 08 00 00 04 39 A5 9B 00 00 08 00 00 04 3A A5 9B 00 00 08 00 00 04 3B A5 9B 00 00 08 00 00 04 3C A5 9B 00 00 08 00 00 04 3D A5 9B 00 00 08 00 00 04 3E A5 9B 00 00 08 00 00 04 3F A5 9B 00 00 08 00 00 04 40 A5 9B 00 00 08 00 00 04 41 A5 9B 00 00 08 00 00 04 42 A5 9B 00 00 08 00 00 04 43 A5 9B 00 00 08 00 00 04 44 A5 9B 00 00 08 00 00 04 45 A5 9B 00 00 08 00 00 04 46 A5 9B 00 00 08 00 00 04 47 A5 9B 00 00 08 00 00 04 48 A5 9B 00 00 08 00 00 04 49 A5 9B 00 00 08 00 00 04 4A A5 9B 00 00 08 00 00 04 4B A5 9B 00 00 08 00 00 04 4C A5 9B 00 00 08 00 00 04 57 A5 9B 00 04 0C 00 00 C2 01 00 00 01 04 58 A5 9B 00 04 0C 00 00 46 05 00 00 01 04 59 A5 9B 00 04 0C 00 00 CC 03 00 00 01 04 5A A5 9B 00 04 0C 00 00 70 02 00 00 01 04 5B A5 9B 00 04 0C 00 00 70 02 00 00 01 04 5C A5 9B 00 04 0C 00 00 18 03 00 00 01 04 5D A5 9B 00 04 0C 00 00 8E 05 00 00 01 04 5E A5 9B 00 04 0C 00 00 30 06 00 00 01 04 5F A5 9B 00 04 0C 00 00 D2 00 00 00 01 04 60 A5 9B 00 00 08 00 00 04 61 A5 9B 00 00 08 00 00 04 62 A5 9B 00 00 08 00 00 04 63 A5 9B 00 04 0C 00 00 C0 02 00 00 01 04 64 A5 9B 00 04 0C 00 00 C0 02 00 00 01 04 65 A5 9B 00 04 0C 00 00 20 02 00 00 01 04 66 A5 9B 00 04 0C 00 00 60 03 00 00 01 04 67 A5 9B 00 04 0C 00 00 C0 02 00 00 01 04 68 A5 9B 00 04 0C 00 00 C0 11 00 00 01 04 69 A5 9B 00 04 0C 00 00 04 06 00 00 01 04 6A A5 9B 00 04 0C 00 00 CA 08 00 00 01 04 6B A5 9B 00 04 0C 00 00 60 03 00 00 01 04 6C A5 9B 00 04 0C 00 00 70 02 00 00 01 04 6D A5 9B 00 04 0C 00 00 98 04 00 00 01 04"));
            mplew.write(HexTool.getByteArrayFromHexString("6E A5 9B 00 04 0C 00 00 96 01 00 00 01 04 6F A5 9B 00 04 0C 00 00 64 02 00 00 01 04 70 A5 9B 00 04 0C 00 00 8E 05 00 00 01 04 71 A5 9B 00 04 0C 00 00 A0 04 00 00 01 04 72 A5 9B 00 04 0C 00 00 D2 00 00 00 01 04 73 A5 9B 00 04 08 00 00 C0 03 00 00 04 74 A5 9B 00 04 0C 00 00 60 03 00 00 01 04 75 A5 9B 00 00 08 00 00 04 76 A5 9B 00 04 0C 00 00 70 02 00 00 01 04 77 A5 9B 00 04 0C 00 00 50 01 00 00 01 04 78 A5 9B 00 04 0C 00 00 A0 05 00 00 01 04 79 A5 9B 00 04 0C 00 00 20 03 00 00 01 04 7A A5 9B 00 04 0C 00 00 20 07 00 00 01 04 7B A5 9B 00 04 0C 00 00 F0 00 00 00 01 04 7C A5 9B 00 04 0C 00 00 41 0A 00 00 01 04 7D A5 9B 00 04 0C 00 00 10 03 00 00 01 04 7E A5 9B 00 04 0C 00 00 3A 03 00 00 01 04 7F A5 9B 00 04 0C 00 00 C0 02 00 00 01 04 80 A5 9B 00 04 0C 00 00 96 01 00 00 01 04 81 A5 9B 00 04 0C 00 00 20 02 00 00 01 04 82 A5 9B 00 04 0C 00 00 A0 05 00 00 01 04 83 A5 9B 00 04 0C 00 00 DA 04 00 00 01 04 84 A5 9B 00 04 0C 00 00 F4 02 00 00 01 04 85 A5 9B 00 00 08 00 00 04 86 A5 9B 00 04 0C 00 00 60 03 00 00 01 04 87 A5 9B 00 00 08 00 00 04 88 A5 9B 00 04 0C 00 00 AE 02 00 00 01 04 89 A5 9B 00 00 08 00 00 04 8A A5 9B 00 04 0C 00 00 00 04 00 00 01 04 8B A5 9B 00 04 0C 00 00 70 02 00 00 01 04 8C A5 9B 00 00 08 00 00 04 8D A5 9B 00 04 0C 00 00 D2 00 00 00 01 04 8E A5 9B 00 04 0C 00 00 EE 02 00 00 01 04 8F A5 9B 00 04 0C 00 00 52 04 00 00 01 04 90 A5 9B 00 04 0C 00 00 00 04 00 00 01 04 91 A5 9B 00 04 0C 00 00 AE 02 00 00 01 04 92 A5 9B 00 04 0C 00 00 96 01 00 00 01 04 93 A5 9B 00 00 08 00 00 04 94 A5 9B 00 04 0C 00 00 24 05 00 00 01 04 95 A5 9B 00 04 0C 00 00 50 04 00 00 01 04 96 A5 9B 00 04 0C 00 00 D2 00 00 00 01 04 97 A5 9B 00 00 08 00 00 04 98 A5 9B 00 00 0C 00 00 01 04 99 A5 9B 00 00 0C 00 00 01 04 9A A5 9B 00 00 0C 00 00 01 04 9B A5 9B 00 00 0C 00 00 01 04 9C A5 9B 00 00 0C 00 00 01 04 9D A5 9B 00 00 0C 00 00 01 04 9E A5 9B 00 00 0C 00 00 01 04 9F A5 9B 00 00 0C 00 00 01 04 A0 A5 9B 00 00 08 00 00 04 A1 A5 9B 00 00 08 00 00 04 A2 A5 9B 00 04 0C 00 00 40 29 00 00 01 04 A3 A5 9B 00 04 0C 00 00 DF 02 00 00 01 04 A4 A5 9B 00 04 08 00 00 18 03 00 00 04 A5 A5 9B 00 04 0C 00 00 68 02 00 00 01 04 A6 A5 9B 00 04 0C 00 00 46 05 00 00 01 04 A7 A5 9B 00 04 0C 00 00 68 02 00 00 01 04 A8 A5 9B 00 04 0C 00 00 68 02 00 00 01 04 A9 A5 9B 00 04 0C 00 00 10 03 00 00 01 04 AA A5 9B 00 04 0C 00 00 22 02 00 00 01 04 AB A5 9B 00 04 0C 00 00 58 02 00 00 01 04 AC A5 9B 00 04 0C 00 00 40 29 00 00 01 04 AD A5 9B 00 04 0C 00 00 40 29 00 00 01 04 AE A5 9B 00 04 0C 00 00 40 29 00 00 01 04 AF A5 9B 00 04 0C 00 00 40 29 00 00 01 04 B0 A5 9B 00 04 08 00 00 40 29 00 00 04 B1 A5 9B 00 04 0C 00 00 40 29 00 00 01 04 B2 A5 9B 00 04 0C 00 00 40 29 00 00 01 04 15 2D 31 01 00 04 00 00 01 16 2D 31 01 00 04 00 00 01 17 2D 31 01 00 04 00 00 01 18 2D 31 01 00 04 00 00 01 19 2D 31 01 00 04 00 00 01 1A 2D 31 01 00 04 00 00 01 1C 2D 31 01 00 04 00 00 01 1D 2D 31 01 00 08 00 00 03 1E 2D 31 01 00 08 00 00 03 20 2D 31 01 00 04 00 00 01 21 2D 31 01 00 04 00 00 01 22 2D 31 01 00 04 00 00 01 23 2D 31 01 00 08 00 00 03 24 2D 31 01 00 04 00 00 01 25 2D 31 01 00 04 00 00 01 26 2D 31 01 00 04 00 00 01 27 2D 31 01 00 08 00 00 03 28 2D 31 01 00 04 00 00 01 29 2D 31 01 00 04 00 00 01 2B 2D 31 01 00 04 00 00 01 2C 2D 31 01 00 08 00 00 03 2D 2D 31 01 00 04 00 00 01 2E 2D 31 01 00 04 00 00 01 35 2D 31 01 00 04 00 00 01 36 2D 31 01 00 04 00 00 01 37 2D 31 01 00 04 00 00 01 38 2D 31 01 00 04 00 00 01 39 2D 31 01 00 04 00 00 01 3A 2D 31 01 00 04 00 00 01 3B 2D 31 01 00 04 00 00 01 3C 2D 31 01 00 04 00 00 01 3D 2D 31 01 00 04 00 00 01 3E 2D 31 01 00 04 00 00 01 3F 2D 31 01 00 04 00 00 01 40 2D 31 01 00 04 00 00 01 41 2D 31 01 00 04 00 00 01 42 2D 31 01 00 04 00 00 01 43 2D 31 01 00 04 00 00 01 44 2D 31 01 00 04 00 00 01 45 2D 31 01 00 04 00 00 01 46 2D 31 01 00 04 00 00 01 47 2D 31 01 00 04 00 00 01 48 2D 31 01 00 04 00 00 01 49 2D 31 01 00 0C 00 00 01 02 4A 2D 31 01 00 04 00 00 01 4B 2D 31 01 00 04 00 00 01 4C 2D 31 01 00 04 00 00 01 4D 2D 31 01 00 04 00 00 01 4E 2D 31 01 00 04 00 00 01 4F 2D 31 01 00 04 00 00 01 50 2D 31 01 00 04 00 00 01 51 2D 31 01 00 04 00 00 01 52 2D 31 01 00 04 00 00 01 53 2D 31 01 00 04 00 00 01 54 2D 31 01 00 04 00 00 01 55 2D 31 01 00 04 00 00 01 56 2D 31 01 00 04 00 00 01 57 2D 31 01 00 04 00 00 01 58 2D 31 01 00 04 00 00 01 59 2D 31 01 00 04 00 00 01 5A 2D 31 01 00 04 00 00 01 5B 2D 31 01 00 04 00 00 01 5C 2D 31 01 00 04 00 00 01 5D 2D 31 01 00 04 00 00 01 5E 2D 31 01 00 04 00 00 01 5F 2D 31 01 00 04 00 00 01 60 2D 31 01 00 04 00 00 01 61 2D 31 01 00 04 00 00 01 62 2D 31 01 00 04 00 00 01 63 2D 31 01 00 04 00 00 01 64 2D 31 01 00 04 00 00 01 65 2D 31 01 00 04 00 00 01 6A 2D 31 01 00 04 00 00 01 6B 2D 31 01 00 04 00 00 01 6C 2D 31 01 00 04 00 00 01 6D 2D 31 01 00 04 00 00 01 6E 2D 31 01 00 04 00 00 01 6F 2D 31 01 00 08 00 00 03 70 2D 31 01 00 04 00 00 01 71 2D 31 01 00 08 00 00 03 74 2D 31 01 00 04 00 00 01 75 2D 31 01 00 04 00 00 01 7E 2D 31 01 00 04 00 00 01 7F 2D 31 01 00 04 00 00 01 80 2D 31 01 00 04 00 00 01 82 2D 31 01 00 04 00 00 01 83 2D 31 01 00 04 00 00 01 84 2D 31 01 00 04 00 00 01 8F 2D 31 01 00 04 00 00 01 93 2D 31 01 00 04 00 00 01 99 2D 31 01 00 04 00 00 01 9A 2D 31 01 00 04 00 00 01 A6 2D 31 01 00 04 00 00 01 A7 2D 31 01 00 04 00 00 01 AF 2D 31 01 00 04 00 00 01 B3 2D 31 01 00 04 00 00 01 B5 2D 31 01 00 04 00 00 01 B6 2D 31 01 00 04 00 00 01 BA 2D 31 01 00 04 00 00 01 BB 2D 31 01 00 08 00 00 03 BC 2D 31 01 00 04 00 00 01 BD 2D 31 01 00 04 00 00 01 BE 2D 31 01 00 04 00 00 01 C7 2D 31 01 00 04 00 00 01 C8 2D 31 01 00 04 00 00 01 C9 2D 31 01 00 04 00 00 01 CA 2D 31 01 00 04 00 00 01 CE 2D 31 01 00 04 00 00 01 CF 2D 31 01 00 04 00 00 01 D0 2D 31 01 00 08 00 00 03 D1 2D 31 01 00 04 00 00 01 D2 2D 31 01 00 04 00 00 01 D3 2D 31 01 00 04 00 00 01 D7 2D 31 01 00 04 00 00 01 D8 2D 31 01 00 04 00 00 01 D9 2D 31 01 00 04 00 00 01 DA 2D 31 01 00 04 00 00 01 DB 2D 31 01 00 04 00 00 01 DD 2D 31 01 00 04 00 00 01 DE 2D 31 01 00 04 00 00 01 DF 2D 31 01 00 0C 00 00 01 02 E0 2D 31 01 00 04 00 00 01 E1 2D 31 01 00 04 00 00 01 E2 2D 31 01 00 04 00 00 01 E3 2D 31 01 00 04 00 00 01 F0 2D 31 01 00 04 00 00 01 F1 2D 31 01 00 04 00 00 01 F3 2D 31 01 00 08 00 00 03 FA 2D 31 01 00 04 00 00 01 FB 2D 31 01 00 04 00 00 01 FC 2D 31 01 00 04 00 00 01 FD 2D 31 01 00 04 00 00 01 FE 2D 31 01 00 04 00 00 01 12 2E 31 01 00 04 00 00 01 13 2E 31 01 00 04 00 00 01 14 2E 31 01 00 04 00 00 01 15 2E 31 01 00 04 00 00 01 16 2E 31 01 00 04 00 00 01 17 2E 31 01 00 04 00 00 01 18 2E 31 01 00 04 00 00 01 19 2E 31 01 00 08 00 00 03 1A 2E 31 01 00 04 00 00 01 1B 2E 31 01 00 04 00 00 01 1C 2E 31 01 00 04 00 00 01 1D 2E 31 01 00 04 00 00 01 1E 2E 31 01 00 04 00 00 01 1F 2E 31 01 00 04 00 00 01 20 2E 31 01 00 04 00 00 01 21 2E 31 01 00 04 00 00 01 22 2E 31 01 00 04 00 00 01 23 2E 31 01 00 04 00 00 01 24 2E 31 01 00 04 00 00 01 25 2E 31 01 00 04 00 00 01 2C 2E 31 01 00 04 00 00 01 2D 2E 31 01 00 04 00 00 01 2E 2E 31 01 00 04 00 00 01 2F 2E 31 01 00 04 00 00 01 30 2E 31 01 00 04 00 00 01 32 2E 31 01 00 04 00 00 01 33 2E 31 01 00 04 00 00 01 34 2E 31 01 00 04 00 00 01 35 2E 31 01 00 04 00 00 01 36 2E 31 01 00 04 00 00 01 38 2E 31 01 00 04 00 00 01 3C 2E 31 01 00 04 00 00 01 3D 2E 31 01 00 04 00 00 01 3E 2E 31 01 00 04 00 00 01 3F 2E 31 01 00 04 00 00 01 40 2E 31 01 00 04 00 00 01 41 2E 31 01 00 04 00 00 01 42 2E 31 01 00 08 00 00 03 43 2E 31 01 00 08 00 00 03 45 2E 31 01 00 04 00 00 01 46 2E 31 01 00 04 00 00 01 48 2E 31 01 00 04 00 00 01 49 2E 31 01 00 04 00 00 01 4A 2E 31 01 00 04 00 00 01 4C 2E 31 01 00 04 00 00 01 4D 2E 31 01 00 04 00 00 01 4E 2E 31 01 00 04 00 00 01 4F 2E 31 01 00 04 00 00 01 50 2E 31 01 00 04 00 00 01 51 2E 31 01 00 04 00 00 01 53 2E 31 01 00 04 00 00 01 54 2E 31 01 00 04 00 00 01 55 2E 31 01 00 04 00 00 01 57 2E 31 01 00 04 00 00 01 59 2E 31 01 00 04 00 00 01 5C 2E 31 01 00 04 00 00 01 5D 2E 31 01 00 04 00 00 01 5E 2E 31 01 00 04 00 00 01 6B 2E 31 01 00 04 00 00 01 6C 2E 31 01 00 04 00 00 01 6D 2E 31 01 00 04 00 00 01 6E 2E 31 01 00 04 00 00 01 74 2E 31 01 00 08 00 00 03 75 2E 31 01 00 08 00 00 03 76 2E 31 01 00 08 00 00 03 77 2E 31 01 00 08 00 00 03 78 2E 31 01 00 08 00 00 03 79 2E 31 01 00 08 00 00 03 7A 2E 31 01 00 08 00 00 03 7B 2E 31 01 00 08 00 00 03 7C 2E 31 01 00 08 00 00 03 7D 2E 31 01 00 08 00 00 03 7E 2E 31 01 00 08 00 00 03 7F 2E 31 01 00 08 00 00 03 80 2E 31 01 00 08 00 00 03 81 2E 31 01 00 08 00 00 03 82 2E 31 01 00 08 00 00 03 83 2E 31 01 00 08 00 00 03 84 2E 31 01 00 04 00 00 01 85 2E 31 01 00 04 00 00 01 86 2E 31 01 00 04 00 00 01 87 2E 31 01 00 08 00 00 03 8A 2E 31 01 00 04 00 00 01 8B 2E 31 01 00 0C 00 00 01 02 8C 2E 31 01 00 04 00 00 01 90 2E 31 01 00 04 00 00 01 91 2E 31 01 00 04 00 00 01 92 2E 31 01 00 04 00 00 01 94 2E 31 01 00 08 00 00 03 95 2E 31 01 00 04 00 00 01 97 2E 31 01 00 08 00 00 03 98 2E 31 01 00 04 00 00 01 99 2E 31 01 00 04 00 00 01 9A 2E 31 01 00 04 00 00 01 9B 2E 31 01 00 04 00 00 01 9C 2E 31 01 00 04 00 00 01 9D 2E 31 01 00 04 00 00 01 9E 2E 31 01 00 04 00 00 01 9F 2E 31 01 00 04 00 00 01 A1 2E 31 01 00 04 00 00 01 A2 2E 31 01 00 04 00 00 01 A3 2E 31 01 00 04 00 00 01 A4 2E 31 01 00 04 00 00 01 AA 2E 31 01 00 04 00 00 01 AB 2E 31 01 00 04 00 00 01 AC 2E 31 01 00 04 00 00 01 AD 2E 31 01 00 04 00 00 01 AE 2E 31 01 00 04 00 00 01 AF 2E 31 01 00 04 00 00 01 B2 2E 31 01 00 04 00 00 01 B3 2E 31 01 00 04 00 00 01 B8 2E 31 01 00 04 00 00 01 B9 2E 31 01 00 0C 00 00 01 02 BB 2E 31 01 00 08 00 00 03 D6 2E 31 01 00 0C 00 00 01 02 DA 2E 31 01 00 08 00 00 03 DC 2E 31 01 00 08 00 00 03 DD 2E 31 01 00 08 00 00 03 DE 2E 31 01 00 04 00 00 01 E2 2E 31 01 00 04 00 00 01 E4 2E 31 01 00 0C 00 00 01 02 E6 2E 31 01 00 04 00 00 01 EE 2E 31 01 00 04 00 00 01 EF 2E 31 01 00 04 00 00 01 F2 2E 31 01 00 04 00 00 01 F5 2E 31 01 00 04 00 00 01 FA 2E 31 01 00 04 00 00 01 FB 2E 31 01 00 04 00 00 01 FC 2E 31 01 00 04 00 00 01 01 2F 31 01 00 04 00 00 01 02 2F 31 01 00 0C 00 00 01 02 03 2F 31 01 00 08 00 00 00 04 2F 31 01 00 08 00 00 00 07 2F 31 01 00 04 00 00 01 09 2F 31 01 00 0C 00 00 01 02 0A 2F 31 01 00 04 00 00 01 0B 2F 31 01 00 08 00 00 00 0C 2F 31 01 00 04 00 00 01 0D 2F 31 01 00 04 00 00 01 0E 2F 31 01 00 04 00 00 01 0F 2F 31 01 00 04 00 00 01 10 2F 31 01 00 04 00 00 01 11 2F 31 01 00 08 00 00 00 12 2F 31 01 00 04 00 00 01 13 2F 31 01 00 04 00 00 01 1C 2F 31 01 00 04 00 00 01 1D 2F 31 01 00 04 00 00 01 1E 2F 31 01 00 04 00 00 01 21 2F 31 01 00 04 00 00 01 22 2F 31 01 00 04 00 00 01 23 2F 31 01 00 08 00 00 03 24 2F 31 01 00 04 00 00 01 26 2F 31 01 00 08 00 00 03 27 2F 31 01 00 04 00 00 01 2E 2F 31 01 00 04 00 00 01 2F 2F 31 01 00 04 00 00 01 30 2F 31 01 00 08 00 00 02 31 2F 31 01 00 04 00 00 01 32 2F 31 01 00 04 00 00 01 33 2F 31 01 00 04 00 00 01 37 2F 31 01 00 0C 00 00 01 02 38 2F 31 01 00 04 00 00 01 39 2F 31 01 00 08 00 00 03 3B 2F 31 01 00 04 00 00 01 3C 2F 31 01 00 04 00 00 01 3D 2F 31 01 00 04 00 00 01 3E 2F 31 01 10 08 00 00 61 00 42 2F 31 01 10 0C 00 00 5E 01 02 44 2F 31 01 00 04 00 00 01 46 2F 31 01 00 04 00 00 01 47 2F 31 01 00 04 00 00 01 48 2F 31 01 00 0C 00 00 01 02 4A 2F 31 01 00 0C 00 00 01 02 4E 2F 31 01 00 08 00 00 00 4F 2F 31 01 00 08 00 00 00 50 2F 31 01 00 08 00 00 00 51 2F 31 01 00 08 00 00 00 53 2F 31 01 00 04 00 00 01 54 2F 31 01 00 08 00 00 00 55 2F 31 01 00 08 00 00 00 56 2F 31 01 00 08 00 00 00 57 2F 31 01 00 0C 00 00 01 02 58 2F 31 01 00 0C 00 00 01 02 59 2F 31 01 00 04 00 00 01 5A 2F 31 01 00 04 00 00 01 5B 2F 31 01 00 04 00 00 01 5C 2F 31 01 00 0C 00 00 01 02 5E 2F 31 01 00 0C 00 00 01 02 5F 2F 31 01 00 04 00 00 01 60 2F 31 01 00 08 00 00 00 61 2F 31 01 00 0C 00 00 01 02 62 2F 31 01 00 08 00 00 00 63 2F 31 01 00 0C 00 00 01 02 64 2F 31 01 00 08 00 00 00 65 2F 31 01 00 08 00 00 00 66 2F 31 01 00 08 00 00 00 67 2F 31 01 00 08 00 00 00 68 2F 31 01 00 08 00 00 00 69 2F 31 01 00 08 00 00 00 6B 2F 31 01 00 04 00 00 01 6C 2F 31 01 00 08 00 00 02 6D 2F 31 01 00 08 00 00 00 6F 2F 31 01 00 0C 00 00 01 02 72 2F 31 01 00 04 00 00 01 73 2F 31 01 00 08 00 00 00 74 2F 31 01 00 04 00 00 01 76 2F 31 01 00 04 00 00 01 7A 2F 31 01 00 0C 00 00 01 02 7B 2F 31 01 00 0C 00 00 01 02 7C 2F 31 01 00 0C 00 00 01 02 7D 2F 31 01 00 0C 00 00 01 02 7E 2F 31 01 00 08 00 00 00 7F 2F 31 01 00 0C 00 00 01 02 80 2F 31 01 00 08 00 00 00 81 2F 31 01 00 04 00 00 01 82 2F 31 01 00 0C 00 00 01 02 83 2F 31 01 00 0C 00 00 01 02 84 2F 31 01 00 0C 00 00 01 02 87 2F 31 01 10 04 00 00 65 01 88 2F 31 01 10 04 00 00 65 01 89 2F 31 01 00 08 00 00 00 8A 2F 31 01 10 0C 00 00 66 01 00 8B 2F 31 01 00 0C 00 00 01 02 8C 2F 31 01 00 08 00 00 00 8D 2F 31 01 00 08 00 00 00 8E 2F 31 01 00 08 00 00 00 90 2F 31 01 00 08 00 00 00 A0 B3 32 01 00 04 00 00 01 A1 B3 32 01 00 04 00 00 01 A2 B3 32 01 00 04 00 00 01 A4 B3 32 01 00 04 00 00 01 A5 B3 32 01 00 04 00 00 01 A6 B3 32 01 00 0C 00 00 01 02 A7 B3 32 01 00 04 00 00 01 A8 B3 32 01 00 0C 00 00 01 02 A9 B3 32 01 00 04 00 00 01 AA B3 32 01 00 04 00 00 01 AB B3 32 01 00 0C 00 00 01 02 AC B3 32 01 00 08 00 00 03 AD B3 32 01 00 04 00 00 01 AE B3 32 01 00 04 00 00 01 B0 B3 32 01 00 0C 00 00 01 02 B1 B3 32 01 00 04 00 00 01 B2 B3 32 01 00 04 00 00 01 B4 B3 32 01 00 04 00 00 01 B5 B3 32 01 00 0C 00 00 01 02 B7 B3 32 01 00 04 00 00 01 B8 B3 32 01 00 04 00 00 01 B9 B3 32 01 00 04 00 00 01 BA B3 32 01 00 04 00 00 01 BB B3 32 01 00 04 00 00 01 BC B3 32 01 00 04 00 00 01 BD B3 32 01 00 04 00 00 01 BE B3 32 01 00 04 00 00 01 BF B3 32 01 00 0C 00 00 01 02 C0 B3 32 01 00 08 00 00 03 C1 B3 32 01 00 04 00 00 01 C2 B3 32 01 00 04 00 00 01 C3 B3 32 01 00 04 00 00 01 C4 B3 32 01 00 04 00 00 01 C5 B3 32 01 00 04 00 00 01 C6 B3 32 01 00 04 00 00 01 C7 B3 32 01 00 0C 00 00 01 02 C8 B3 32 01 00 04 00 00 01 C9 B3 32 01 00 04 00 00 01 CB B3 32 01 00 08 00 00 03 CD B3 32 01 00 04 00 00 01 CE B3 32 01 00 0C 00 00 01 02 CF B3 32 01 00 04 00 00 01 D0 B3 32 01 00 04 00 00 01 D1 B3 32 01 00 0C 00 00 01 02 D2 B3 32 01 00 04 00 00 01 D3 B3 32 01 00 0C 00 00 01 02 D4 B3 32 01 00 08 00 00 03 D5 B3 32 01 00 04 00 00 01 D6 B3 32 01 00 08 00 00 03 D7 B3 32 01 00 04 00 00 01 D8 B3 32 01 00 04 00 00 01 D9 B3 32 01 00 04 00 00 01 DA B3 32 01 00 0C 00 00 01 02 DB B3 32 01 00 04 00 00 01 DC B3 32 01 00 04 00 00 01 DD B3 32 01 00 04 00 00 01 DF B3 32 01 00 04 00 00 01 E0 B3 32 01 00 08 00 00 02 E1 B3 32 01 00 08 00 00 03 E2 B3 32 01 00 04 00 00 01 E4 B3 32 01 00 04 00 00 01 E5 B3 32 01 00 0C 00 00 01 02 E6 B3 32 01 00 04 00 00 01 E8 B3 32 01 00 04 00 00 01 E9 B3 32 01 00 0C 00 00 01 02 EA B3 32 01 00 04 00 00 01 EC B3 32 01 00 0C 00 00 01 02 ED B3 32 01 00 04 00 00 01 EE B3 32 01 00 04 00 00 01 EF B3 32 01 00 0C 00 00 01 02 F0 B3 32 01 00 04 00 00 01 F2 B3 32 01 00 08 00 00 03 F3 B3 32 01 00 04 00 00 01 F4 B3 32 01 00 04 00 00 01 F5 B3 32 01 00 0C 00 00 01 02 F6 B3 32 01 00 0C 00 00 01 02 F7 B3 32 01 00 04 00 00 01 40 3A 34 01 00 04 00 00 01 41 3A 34 01 00 04 00 00 01 42 3A 34 01 00 04 00 00 01 43 3A 34 01 00 04 00 00 01 44 3A 34 01 00 04 00 00 01 45 3A 34 01 00 04 00 00 01 46 3A 34 01 00 04 00 00 01 47 3A 34 01 00 04 00 00 01 48 3A 34 01 00 04 00 00 01 49 3A 34 01 00 04 00 00 01 4A 3A 34 01 00 04 00 00 01 4C 3A 34 01 00 04 00 00 01 4D 3A 34 01 00 04 00 00 01 4E 3A 34 01 00 0C 00 00 01 02 4F 3A 34 01 00 04 00 00 01 50 3A 34 01 00 04 00 00 01 51 3A 34 01 00 04 00 00 01 52 3A 34 01 00 04 00 00 01 53 3A 34 01 00 04 00 00 01 54 3A 34 01 00 04 00 00 01 55 3A 34 01 00 04 00 00 01 56 3A 34 01 00 04 00 00 01 57 3A 34 01 00 04 00 00 01 58 3A 34 01 00 04 00 00 01 59 3A 34 01 00 04 00 00 01 5A 3A 34 01 00 04 00 00 01 5B 3A 34 01 00 04 00 00 01 5C 3A 34 01 00 04 00 00 01 5D 3A 34 01 00 04 00 00 01 5F 3A 34 01 00 04 00 00 01 60 3A 34 01 00 04 00 00 01 61 3A 34 01 00 0C 00 00 01 02 62 3A 34 01 00 04 00 00 01 63 3A 34 01 00 04 00 00 01 64 3A 34 01 00 04 00 00 01 65 3A 34 01 00 04 00 00 01 66 3A 34 01 00 04 00 00 01 67 3A 34 01 00 04 00 00 01 68 3A 34 01 00 04 00 00 01 69 3A 34 01 00 04 00 00 01 70 3A 34 01 00 08 00 00 03 74 3A 34 01 00 04 00 00 01 75 3A 34 01 00 04 00 00 01 7A 3A 34 01 00 04 00 00 01 7B 3A 34 01 00 0C 00 00 01 02 7D 3A 34 01 00 04 00 00 01 7E 3A 34 01 00 04 00 00 01 7F 3A 34 01 00 04 00 00 01 80 3A 34 01 00 08 00 00 03 81 3A 34 01 00 0C 00 00 01 02 82 3A 34 01 00 04 00 00 01 83 3A 34 01 00 04 00 00 01 84 3A 34 01 00 04 00 00 01 85 3A 34 01 00 04 00 00 01 88 3A 34 01 00 04 00 00 01 89 3A 34 01 00 04 00 00 01 8A 3A 34 01 00 04 00 00 01 8B 3A 34 01 00 04 00 00 01 92 3A 34 01 00 04 00 00 01 93 3A 34 01 00 04 00 00 01 95 3A 34 01 00 04 00 00 01 96 3A 34 01 00 04 00 00 01 98 3A 34 01 00 0C 00 00 01 02 99 3A 34 01 00 0C 00 00 01 02 9A 3A 34 01 00 04 00 00 01 9C 3A 34 01 00 0C 00 00 01 02 9D 3A 34 01 00 04 00 00 01 9E 3A 34 01 10 08 00 00 5A 00 9F 3A 34 01 00 04 00 00 01 A2 3A 34 01 00 04 00 00 01 A4 3A 34 01 00 08 00 00 03 A5 3A 34 01 00 04 00 00 01 A6 3A 34 01 00 0C 00 00 01 02 A7 3A 34 01 00 04 00 00 01 A8 3A 34 01 00 0C 00 00 01 02 EA C0 35 01 00 04 00 00 01 EB C0 35 01 00 04 00 00 01 EC C0 35 01 00 04 00 00 01 ED C0 35 01 00 04 00 00 01 EE C0 35 01 00 04 00 00 01 EF C0 35 01 00 04 00 00 01 F0 C0 35 01 00 04 00 00 01 F1 C0 35 01 00 08 00 00 03 F2 C0 35 01 00 08 00 00 03 F3 C0 35 01 00 04 00 00 01 F4 C0 35 01 00 04 00 00 01 F7 C0 35 01 00 04 00 00 01 F8 C0 35 01 00 08 00 00 03 F9 C0 35 01 00 08 00 00 03 FA C0 35 01 00 08 00 00 03 FB C0 35 01 00 04 00 00 01 FC C0 35 01 00 04 00 00 01 FD C0 35 01 00 0C 00 00 01 02 FE C0 35 01 00 0C 00 00 01 02 FF C0 35 01 00 04 00 00 01 00 C1 35 01 00 04 00 00 01 01 C1 35 01 00 04 00 00 01 02 C1 35 01 00 04 00 00 01 03 C1 35 01 00 04 00 00 01 04 C1 35 01 00 04 00 00 01 05 C1 35 01 00 04 00 00 01 06 C1 35 01 00 04 00 00 01 07 C1 35 01 00 04 00 00 01 08 C1 35 01 00 04 00 00 01 09 C1 35 01 00 04 00 00 01 0A C1 35 01 00 04 00 00 01 0B C1 35 01 00 04 00 00 01 0C C1 35 01 00 04 00 00 01 0D C1 35 01 00 04 00 00 01 0E C1 35 01 00 04 00 00 01 0F C1 35 01 00 04 00 00 01 10 C1 35 01 00 04 00 00 01 11 C1 35 01 00 04 00 00 01 12 C1 35 01 00 04 00 00 01 13 C1 35 01 00 04 00 00 01 14 C1 35 01 00 04 00 00 01 15 C1 35 01 00 04 00 00 01 16 C1 35 01 00 04 00 00 01 17 C1 35 01 00 04 00 00 01 18 C1 35 01 00 04 00 00 01 19 C1 35 01 00 0C 00 00 01 02 1A C1 35 01 00 04 00 00 01 1B C1 35 01 00 04 00 00 01 1C C1 35 01 00 04 00 00 01 1D C1 35 01 00 04 00 00 01 1E C1 35 01 00 0C 00 00 01 02 1F C1 35 01 00 04 00 00 01 20 C1 35 01 00 04 00 00 01 21 C1 35 01 00 04 00 00 01 2E C1 35 01 00 04 00 00 01 2F C1 35 01 00 04 00 00 01 30 C1 35 01 00 04 00 00 01 31 C1 35 01 00 04 00 00 01 38 C1 35 01 00 04 00 00 01 39 C1 35 01 00 04 00 00 01 3A C1 35 01 00 04 00 00 01 3B C1 35 01 00 04 00 00 01 3C C1 35 01 00 0C 00 00 01 02 3D C1 35 01 00 04 00 00 01 3E C1 35 01 00 04 00 00 01 3F C1 35 01 00 04 00 00 01 40 C1 35 01 00 0C 00 00 01 02 41 C1 35 01 00 04 00 00 01 42 C1 35 01 00 04 00 00 01 43 C1 35 01 00 04 00 00 01 44 C1 35 01 00 04 00 00 01 47 C1 35 01 00 04 00 00 01 48 C1 35 01 00 04 00 00 01 49 C1 35 01 00 08 00 00 03 4A C1 35 01 00 08 00 00 03 4C C1 35 01 00 08 00 00 02 51 C1 35 01 00 04 00 00 01 53 C1 35 01 00 04 00 00 01 5D C1 35 01 00 04 00 00 01 5E C1 35 01 00 04 00 00 01 61 C1 35 01 00 04 00 00 01 62 C1 35 01 00 04 00 00 01 65 C1 35 01 00 04 00 00 01 66 C1 35 01 00 04 00 00 01 6A C1 35 01 00 04 00 00 01 6B C1 35 01 00 04 00 00 01 6E C1 35 01 00 04 00 00 01 70 C1 35 01 00 04 00 00 01 71 C1 35 01 00 04 00 00 01 73 C1 35 01 00 04 00 00 01 75 C1 35 01 00 04 00 00 01 77 C1 35 01 00 04 00 00 01 78 C1 35 01 00 08 00 00 02 79 C1 35 01 00 04 00 00 01 7A C1 35 01 00 04 00 00 01 7B C1 35 01 00 04 00 00 01 7D C1 35 01 00 04 00 00 01 7E C1 35 01 00 04 00 00 01 86 C1 35 01 00 08 00 00 03 87 C1 35 01 00 08 00 00 03 8A C1 35 01 00 04 00 00 01 8B C1 35 01 00 04 00 00 01 8C C1 35 01 00 0C 00 00 01 02 8D C1 35 01 00 04 00 00 01 91 C1 35 01 00 04 00 00 01 92 C1 35 01 00 04 00 00 01 93 C1 35 01 00 04 00 00 01 94 C1 35 01 00 04 00 00 01 98 C1 35 01 00 04 00 00 01 99 C1 35 01 00 04 00 00 01 9D C1 35 01 00 04 00 00 01 9E C1 35 01 00 04 00 00 01 A1 C1 35 01 00 08 00 00 03 A2 C1 35 01 00 08 00 00 03 AB C1 35 01 00 08 00 00 02 AD C1 35 01 00 08 00 00 02 AF C1 35 01 00 04 00 00 01 B0 C1 35 01 00 04 00 00 01 B1 C1 35 01 00 04 00 00 01 B2 C1 35 01 00 04 00 00 01 B3 C1 35 01 00 04 00 00 01 B4 C1 35 01 00 04 00 00 01 B5 C1 35 01 00 04 00 00 01 B6 C1 35 01 00 04 00 00 01 B7 C1 35 01 00 04 00 00 01 B8 C1 35 01 00 04 00 00 01 BF C1 35 01 00 04 00 00 01 C0 C1 35 01 00 04 00 00 01 C1 C1 35 01 00 04 00 00 01 C2 C1 35 01 00 04 00 00 01 CA C1 35 01 00 0C 00 00 01 02 CD C1 35 01 00 08 00 00 03 CE C1 35 01 00 04 00 00 01 CF C1 35 01 00 04 00 00 01 D2 C1 35 01 00 08 00 00 03 D3 C1 35 01 00 04 00 00 01 D8 C1 35 01 00 0C 00 00 01 02 D9 C1 35 01 00 08 00 00 02 DA C1 35 01 00 04 00 00 01 DB C1 35 01 00 04 00 00 01 DC C1 35 01 00 04 00 00 01 DD C1 35 01 00 04 00 00 01 DF C1 35 01 00 04 00 00 01 E7 C1 35 01 10 04 00 00 09 01 E8 C1 35 01 10 04 00 00 09 01 F1 C1 35 01 00 0C 00 00 01 02 F2 C1 35 01 00 04 00 00 01 F4 C1 35 01 00 08 00 00 00 F5 C1 35 01 00 0C 00 00 01 02 F6 C1 35 01 00 0C 00 00 01 02 F7 C1 35 01 00 04 00 00 01 F8 C1 35 01 00 08 00 00 00 F9 C1 35 01 00 0C 00 00 01 02 FC C1 35 01 00 04 00 00 01 02 C2 35 01 00 0C 00 00 01 02 03 C2 35 01 00 0C 00 00 01 02 04 C2 35 01 00 08 00 00 00 06 C2 35 01 00 08 00 00 00 07 C2 35 01 00 04 00 00 01 0D C2 35 01 00 04 00 00 01 0E C2 35 01 10 04 00 00 09 01 0F C2 35 01 00 04 00 00 01 10 C2 35 01 00 04 00 00 01 19 C2 35 01 00 0C 00 00 01 02 1A C2 35 01 00 0C 00 00 01 02 1F C2 35 01 00 08 00 00 00 20 C2 35 01 00 08 00 00 00 21 C2 35 01 00 08 00 00 00 22 C2 35 01 00 08 00 00 00 23 C2 35 01 00 08 00 00 00 24 C2 35 01 00 08 00 00 00 25 C2 35 01 00 08 00 00 00 26 C2 35 01 00 08 00 00 00 27 C2 35 01 00 04 00 00 01 28 C2 35 01 00 04 00 00 01 29 C2 35 01 10 08 00 00 63 00 2A C2 35 01 10 00 00 00 63 2B C2 35 01 10 00 00 00 64 2C C2 35 01 00 04 00 00 01 2E C2 35 01 00 0C 00 00 01 02 2F C2 35 01 00 0C 00 00 01 02 30 C2 35 01 00 0C 00 00 01 02 31 C2 35 01 00 04 00 00 01 32 C2 35 01 00 04 00 00 01 33 C2 35 01 00 04 00 00 01 34 C2 35 01 00 0C 00 00 01 02 35 C2 35 01 00 04 00 00 01 36 C2 35 01 10 08 00 00 64 00 37 C2 35 01 10 0C 00 00 61 01 02 38 C2 35 01 00 08 00 00 00 39 C2 35 01 00 0C 00 00 01 02 3A C2 35 01 00 0C 00 00 01 02 3B C2 35 01 00 04 00 00 01 3C C2 35 01 10 08 00 00 64 00 3D C2 35 01 10 08 00 00 64 00 3E C2 35 01 00 08 00 00 00 3F C2 35 01 00 08 00 00 00 40 C2 35 01 10 00 00 00 64 41 C2 35 01 10 00 00 00 64 42 C2 35 01 10 00 00 00 64 43 C2 35 01 10 08 00 00 64 00 44 C2 35 01 10 08 00 00 64 00 45 C2 35 01 10 08 00 00 64 00 46 C2 35 01 10 08 00 00 64 00 47 C2 35 01 10 08 00 00 64 00 48 C2 35 01 10 00 00 00 64 49 C2 35 01 10 08 00 00 64 00 4A C2 35 01 10 00 00 00 64 4B C2 35 01 00 04 00 00 01 4C C2 35 01 10 00 00 00 64 4D C2 35 01 10 04 00 00 61 01 4E C2 35 01 10 00 00 00 64 4F C2 35 01 10 04 00 00 61 01 50 C2 35 01 10 00 00 00 64 51 C2 35 01 10 00 00 00 64 52 C2 35 01 10 00 00 00 64 53 C2 35 01 10 0C 00 00 63 01 02 54 C2 35 01 10 0C 00 00 63 01 02 55 C2 35 01 10 0C 00 00 64 01 02 56 C2 35 01 10 0C 00 00 64 01 02 57 C2 35 01 10 0C 00 00 64 01 02 58 C2 35 01 00 0C 00 00 01 02 59 C2 35 01 00 0C 00 00 01 02 5A C2 35 01 00 0C 00 00 01 02 5B C2 35 01 00 0C 00 00 01 02 5C C2 35 01 00 04 00 00 01 5D C2 35 01 00 0C 00 00 01 02 5E C2 35 01 10 0C 00 00 64 01 02 61 C2 35 01 00 04 00 00 01 62 C2 35 01 00 04 00 00 01 63 C2 35 01 00 08 00 00 00 64 C2 35 01 00 08 00 00 00 65 C2 35 01 00 08 00 00 00 8E 47 37 01 00 04 00 00 01 8F 47 37 01 00 04 00 00 01 90 47 37 01 00 04 00 00 01 91 47 37 01 00 04 00 00 01 92 47 37 01 00 04 00 00 01 94 47 37 01 00 04 00 00 01 95 47 37 01 00 04 00 00 01 96 47 37 01 00 04 00 00 01 97 47 37 01 00 04 00 00 01 98 47 37 01 00 04 00 00 01 99 47 37 01 00 04 00 00 01 9A 47 37 01 00 04 00 00 01 9B 47 37 01 00 04 00 00 01 9C 47 37 01 00 04 00 00 01 9D 47 37 01 00 04 00 00 01 9E 47 37 01 00 0C 00 00 01 02 A3 47 37 01 00 04 00 00 01 AA 47 37 01 00 04 00 00 01 AB 47 37 01 00 04 00 00 01 AC 47 37 01 00 04 00 00 01 AD 47 37 01 00 04 00 00 01 AE 47 37 01 00 04 00 00 01 AF 47 37 01 00 04 00 00 01 B1 47 37 01 00 04 00 00 01 B2 47 37 01 00 04 00 00 01 B3 47 37 01 00 04 00 00 01 B4 47 37 01 00 04 00 00 01 B5 47 37 01 00 04 00 00 01 B6 47 37 01 00 04 00 00 01 B8 47 37 01 00 04 00 00 01 B9 47 37 01 00 04 00 00 01 BA 47 37 01 00 04 00 00 01 BB 47 37 01 00 04 00 00 01 BC 47 37 01 00 04 00 00 01 BD 47 37 01 00 04 00 00 01 BE 47 37 01 00 04 00 00 01 BF 47 37 01 00 04 00 00 01 C0 47 37 01 00 04 00 00 01 C1 47 37 01 00 04 00 00 01 C2 47 37 01 00 04 00 00 01 C3 47 37 01 00 04 00 00 01 C4 47 37 01 00 04 00 00 01 C5 47 37 01 00 04 00 00 01 C6 47 37 01 00 04 00 00 01 C7 47 37 01 00 04 00 00 01 C8 47 37 01 00 04 00 00 01 CA 47 37 01 00 04 00 00 01 CC 47 37 01 00 08 00 00 02 CD 47 37 01 00 08 00 00 02 D3 47 37 01 00 04 00 00 01 D4 47 37 01 00 04 00 00 01 D5 47 37 01 00 0C 00 00 01 02 D6 47 37 01 00 04 00 00 01 D7 47 37 01 00 04 00 00 01 D8 47 37 01 00 04 00 00 01 D9 47 37 01 00 04 00 00 01 DA 47 37 01 00 04 00 00 01 DB 47 37 01 00 04 00 00 01 DC 47 37 01 00 04 00 00 01 DF 47 37 01 00 04 00 00 01 E0 47 37 01 00 04 00 00 01 E1 47 37 01 00 04 00 00 01 E2 47 37 01 00 04 00 00 01 E3 47 37 01 00 04 00 00 01 E4 47 37 01 00 04 00 00 01 E5 47 37 01 00 04 00 00 01 E6 47 37 01 00 04 00 00 01 E7 47 37 01 00 04 00 00 01 EF 47 37 01 00 04 00 00 01 F0 47 37 01 00 08 00 00 03 F1 47 37 01 00 04 00 00 01 F2 47 37 01 00 04 00 00 01 FE 47 37 01 00 04 00 00 01 FF 47 37 01 00 04 00 00 01 00 48 37 01 00 04 00 00 01 01 48 37 01 00 04 00 00 01 02 48 37 01 00 04 00 00 01 03 48 37 01 00 04 00 00 01 04 48 37 01 00 04 00 00 01 05 48 37 01 00 04 00 00 01 07 48 37 01 00 04 00 00 01 08 48 37 01 00 04 00 00 01 09 48 37 01 00 04 00 00 01 0A 48 37 01 00 04 00 00 01 0B 48 37 01 00 04 00 00 01 0C 48 37 01 00 04 00 00 01 0D 48 37 01 00 04 00 00 01 0E 48 37 01 00 04 00 00 01 0F 48 37 01 00 04 00 00 01 11 48 37 01 00 04 00 00 01 15 48 37 01 00 04 00 00 01 16 48 37 01 00 04 00 00 01 17 48 37 01 00 08 00 00 02 19 48 37 01 00 04 00 00 01 1A 48 37 01 00 04 00 00 01 1B 48 37 01 00 0C 00 00 01 02 1E 48 37 01 00 04 00 00 01 1F 48 37 01 00 04 00 00 01 20 48 37 01 00 04 00 00 01 28 48 37 01 00 04 00 00 01 33 48 37 01 00 0C 00 00 01 02 38 48 37 01 00 04 00 00 01 39 48 37 01 00 04 00 00 01 3A 48 37 01 00 04 00 00 01 3B 48 37 01 00 04 00 00 01 3C 48 37 01 00 04 00 00 01 3D 48 37 01 00 04 00 00 01 3E 48 37 01 00 0C 00 00 01 02 43 48 37 01 00 04 00 00 01 44 48 37 01 00 0C 00 00 01 02 45 48 37 01 00 04 00 00 01 46 48 37 01 00 04 00 00 01 49 48 37 01 00 04 00 00 01 4A 48 37 01 00 04 00 00 01 4B 48 37 01 00 04 00 00 01 4C 48 37 01 00 0C 00 00 01 02 4D 48 37 01 00 04 00 00 01 55 48 37 01 00 04 00 00 01 57 48 37 01 00 04 00 00 01 5A 48 37 01 00 0C 00 00 01 02 5B 48 37 01 00 0C 00 00 01 02 5D 48 37 01 00 04 00 00 01 5F 48 37 01 00 04 00 00 01 62 48 37 01 00 04 00 00 01 63 48 37 01 00 04 00 00 01 64 48 37 01 00 0C 00 00 01 02 65 48 37 01 00 04 00 00 01 66 48 37 01 00 04 00 00 01 67 48 37 01 00 04 00 00 01 68 48 37 01 00 0C 00 00 01 02 69 48 37 01 00 04 00 00 01 6B 48 37 01 00 04 00 00 01 6C 48 37 01 00 0C 00 00 01 02 6E 48 37 01 00 04 00 00 01 6F 48 37 01 00 04 00 00 01 71 48 37 01 00 04 00 00 01 73 48 37 01 00 04 00 00 01 74 48 37 01 00 04 00 00 01 75 48 37 01 00 0C 00 00 01 02 76 48 37 01 00 04 00 00 01 77 48 37 01 00 04 00 00 01 78 48 37 01 00 04 00 00 01 7A 48 37 01 00 08 00 00 00 7C 48 37 01 00 0C 00 00 01 02 7D 48 37 01 00 0C 00 00 01 02 7E 48 37 01 00 0C 00 00 01 02 7F 48 37 01 00 04 00 00 01 80 48 37 01 00 08 00 00 02 82 48 37 01 00 08 00 00 02 83 48 37 01 00 08 00 00 00 84 48 37 01 00 08 00 00 00 85 48 37 01 00 08 00 00 00 86 48 37 01 00 08 00 00 00 87 48 37 01 00 08 00 00 00 88 48 37 01 00 0C 00 00 01 02 89 48 37 01 00 0C 00 00 01 02 8A 48 37 01 00 08 00 00 00 8B 48 37 01 00 0C 00 00 01 02 8C 48 37 01 00 04 00 00 01 8D 48 37 01 00 04 00 00 01 8E 48 37 01 00 0C 00 00 01 02 8F 48 37 01 00 0C 00 00 01 02 90 48 37 01 00 04 00 00 01 91 48 37 01 00 04 00 00 01 92 48 37 01 00 0C 00 00 01 02 93 48 37 01 00 0C 00 00 01 02 94 48 37 01 00 08 00 00 00 95 48 37 01 00 0C 00 00 01 00 31 CE 38 01 00 04 00 00 01 33 CE 38 01 00 0C 00 00 01 02 34 CE 38 01 00 04 00 00 01 35 CE 38 01 00 04 00 00 01 36 CE 38 01 00 04 00 00 01 37 CE 38 01 00 04 00 00 01 38 CE 38 01 00 04 00 00 01 39 CE 38 01 00 04 00 00 01 3A CE 38 01 00 0C 00 00 01 02 3B CE 38 01 00 04 00 00 01 3C CE 38 01 00 04 00 00 01 3D CE 38 01 00 04 00 00 01 3E CE 38 01 00 04 00 00 01 3F CE 38 01 00 04 00 00 01 40 CE 38 01 00 04 00 00 01 41 CE 38 01 00 0C 00 00 01 02 42 CE 38 01 00 04 00 00 01 43 CE 38 01 00 04 00 00 01 44 CE 38 01 00 04 00 00 01 45 CE 38 01 00 04 00 00 01 46 CE 38 01 00 04 00 00 01 47 CE 38 01 00 04 00 00 01 48 CE 38 01 00 04 00 00 01 4B CE 38 01 00 04 00 00 01 4C CE 38 01 00 04 00 00 01 4D CE 38 01 00 04 00 00 01 4E CE 38 01 00 04 00 00 01 4F CE 38 01 00 04 00 00 01 50 CE 38 01 00 04 00 00 01 51 CE 38 01 00 04 00 00 01 52 CE 38 01 00 04 00 00 01 53 CE 38 01 00 04 00 00 01 54 CE 38 01 00 04 00 00 01 55 CE 38 01 00 04 00 00 01 56 CE 38 01 00 04 00 00 01 57 CE 38 01 00 0C 00 00 01 02 58 CE 38 01 00 04 00 00 01 59 CE 38 01 00 04 00 00 01 5A CE 38 01 00 04 00 00 01 5B CE 38 01 00 04 00 00 01 5C CE 38 01 00 04 00 00 01 5D CE 38 01 00 04 00 00 01 5E CE 38 01 00 04 00 00 01 5F CE 38 01 00 04 00 00 01 60 CE 38 01 00 04 00 00 01 61 CE 38 01 00 04 00 00 01 62 CE 38 01 00 04 00 00 01 64 CE 38 01 00 04 00 00 01 66 CE 38 01 00 04 00 00 01 67 CE 38 01 00 04 00 00 01 68 CE 38 01 00 04 00 00 01 69 CE 38 01 00 04 00 00 01 6A CE 38 01 00 04 00 00 01 6B CE 38 01 00 04 00 00 01 6C CE 38 01 00 04 00 00 01 6D CE 38 01 00 04 00 00 01 6E CE 38 01 00 04 00 00 01 70 CE 38 01 00 04 00 00 01 71 CE 38 01 00 04 00 00 01 72 CE 38 01 00 04 00 00 01 73 CE 38 01 00 04 00 00 01 74 CE 38 01 00 0C 00 00 01 02 75 CE 38 01 00 04 00 00 01 76 CE 38 01 00 0C 00 00 01 02 77 CE 38 01 00 04 00 00 01 78 CE 38 01 00 04 00 00 01 79 CE 38 01 00 04 00 00 01 7A CE 38 01 00 04 00 00 01 7B CE 38 01 00 04 00 00 01 7C CE 38 01 00 04 00 00 01 7E CE 38 01 00 04 00 00 01"));
            mplew.write(HexTool.getByteArrayFromHexString("81 CE 38 01 00 04 00 00 01 82 CE 38 01 00 08 00 00 03 83 CE 38 01 00 0C 00 00 01 02 84 CE 38 01 00 04 00 00 01 85 CE 38 01 00 04 00 00 01 86 CE 38 01 00 04 00 00 01 87 CE 38 01 00 04 00 00 01 89 CE 38 01 00 04 00 00 01 8B CE 38 01 00 04 00 00 01 8C CE 38 01 00 04 00 00 01 8D CE 38 01 00 04 00 00 01 8F CE 38 01 00 04 00 00 01 91 CE 38 01 00 0C 00 00 01 02 92 CE 38 01 00 04 00 00 01 94 CE 38 01 00 04 00 00 01 95 CE 38 01 00 04 00 00 01 97 CE 38 01 00 04 00 00 01 98 CE 38 01 00 04 00 00 01 99 CE 38 01 00 04 00 00 01 A2 CE 38 01 00 04 00 00 01 A7 CE 38 01 00 04 00 00 01 A9 CE 38 01 00 04 00 00 01 AA CE 38 01 00 0C 00 00 01 02 AC CE 38 01 00 04 00 00 01 AD CE 38 01 00 04 00 00 01 B2 CE 38 01 00 04 00 00 01 B3 CE 38 01 00 04 00 00 01 B4 CE 38 01 00 04 00 00 01 B5 CE 38 01 00 04 00 00 01 B8 CE 38 01 00 04 00 00 01 B9 CE 38 01 00 04 00 00 01 BA CE 38 01 00 04 00 00 01 BB CE 38 01 00 04 00 00 01 BC CE 38 01 00 04 00 00 01 BE CE 38 01 00 0C 00 00 01 02 BF CE 38 01 00 04 00 00 01 C0 CE 38 01 00 04 00 00 01 C1 CE 38 01 00 04 00 00 01 C2 CE 38 01 00 04 00 00 01 C4 CE 38 01 00 04 00 00 01 C5 CE 38 01 00 04 00 00 01 C7 CE 38 01 00 04 00 00 01 C8 CE 38 01 00 0C 00 00 01 02 C9 CE 38 01 00 04 00 00 01 CA CE 38 01 00 04 00 00 01 CB CE 38 01 00 04 00 00 01 CC CE 38 01 00 0C 00 00 01 02 CD CE 38 01 00 0C 00 00 01 02 CE CE 38 01 00 04 00 00 01 CF CE 38 01 00 04 00 00 01 D0 CE 38 01 00 04 00 00 01 D2 CE 38 01 00 0C 00 00 01 02 D3 CE 38 01 00 04 00 00 01 D4 CE 38 01 00 0C 00 00 01 02 D5 CE 38 01 00 04 00 00 01 D6 CE 38 01 00 04 00 00 01 D7 CE 38 01 00 04 00 00 01 D8 CE 38 01 00 0C 00 00 01 02 D9 CE 38 01 00 0C 00 00 01 02 DA CE 38 01 00 08 00 00 00 DB CE 38 01 00 04 00 00 01 DC CE 38 01 00 08 00 00 00 DD CE 38 01 00 04 00 00 01 DE CE 38 01 00 0C 00 00 01 02 DF CE 38 01 00 04 00 00 01 E0 CE 38 01 00 0C 00 00 01 02 E1 CE 38 01 00 0C 00 00 01 02 E2 CE 38 01 00 08 00 00 00 E3 CE 38 01 00 08 00 00 00 E4 CE 38 01 00 08 00 00 00 E5 CE 38 01 00 0C 00 00 01 00 C9 54 3A 01 00 04 00 00 01 CA 54 3A 01 00 04 00 00 01 CB 54 3A 01 00 0C 00 00 01 02 CC 54 3A 01 00 04 00 00 01 CD 54 3A 01 00 04 00 00 01 CE 54 3A 01 00 04 00 00 01 CF 54 3A 01 00 04 00 00 01 D0 54 3A 01 00 04 00 00 01 D2 54 3A 01 00 04 00 00 01 D3 54 3A 01 00 04 00 00 01 D4 54 3A 01 00 04 00 00 01 D5 54 3A 01 00 04 00 00 01 D6 54 3A 01 00 08 00 00 03 D7 54 3A 01 00 08 00 00 03 D8 54 3A 01 00 04 00 00 01 D9 54 3A 01 00 04 00 00 01 DA 54 3A 01 00 04 00 00 01 DB 54 3A 01 00 04 00 00 01 DC 54 3A 01 00 04 00 00 01 DD 54 3A 01 00 04 00 00 01 DE 54 3A 01 00 0C 00 00 01 02 DF 54 3A 01 00 04 00 00 01 E0 54 3A 01 00 04 00 00 01 E1 54 3A 01 00 04 00 00 01 E2 54 3A 01 00 0C 00 00 01 02 E3 54 3A 01 00 04 00 00 01 E4 54 3A 01 00 04 00 00 01 E5 54 3A 01 00 04 00 00 01 E6 54 3A 01 00 04 00 00 01 E7 54 3A 01 00 04 00 00 01 E8 54 3A 01 00 04 00 00 01 FC 54 3A 01 00 04 00 00 01 FD 54 3A 01 00 04 00 00 01 FE 54 3A 01 00 04 00 00 01 00 55 3A 01 00 04 00 00 01 01 55 3A 01 00 04 00 00 01 02 55 3A 01 00 04 00 00 01 03 55 3A 01 00 04 00 00 01 08 55 3A 01 00 04 00 00 01 09 55 3A 01 00 0C 00 00 01 02 0F 55 3A 01 00 04 00 00 01 10 55 3A 01 00 04 00 00 01 11 55 3A 01 00 04 00 00 01 12 55 3A 01 00 04 00 00 01 13 55 3A 01 00 04 00 00 01 14 55 3A 01 00 04 00 00 01 15 55 3A 01 00 04 00 00 01 17 55 3A 01 00 04 00 00 01 1B 55 3A 01 00 0C 00 00 01 02 1C 55 3A 01 00 04 00 00 01 1D 55 3A 01 00 04 00 00 01 1E 55 3A 01 00 04 00 00 01 1F 55 3A 01 00 04 00 00 01 20 55 3A 01 00 04 00 00 01 21 55 3A 01 00 04 00 00 01 22 55 3A 01 00 04 00 00 01 23 55 3A 01 00 04 00 00 01 25 55 3A 01 00 04 00 00 01 27 55 3A 01 00 0C 00 00 01 02 2B 55 3A 01 00 04 00 00 01 2F 55 3A 01 00 04 00 00 01 31 55 3A 01 00 08 00 00 03 32 55 3A 01 00 08 00 00 03 33 55 3A 01 00 04 00 00 01 39 55 3A 01 00 04 00 00 01 3A 55 3A 01 00 04 00 00 01 3B 55 3A 01 00 04 00 00 01 3C 55 3A 01 00 04 00 00 01 3D 55 3A 01 00 04 00 00 01 3E 55 3A 01 00 04 00 00 01 3F 55 3A 01 00 04 00 00 01 40 55 3A 01 00 04 00 00 01 41 55 3A 01 00 04 00 00 01 42 55 3A 01 00 04 00 00 01 45 55 3A 01 00 04 00 00 01 46 55 3A 01 00 04 00 00 01 47 55 3A 01 00 04 00 00 01 4C 55 3A 01 00 04 00 00 01 51 55 3A 01 00 04 00 00 01 5A 55 3A 01 00 04 00 00 01 5B 55 3A 01 00 04 00 00 01 5C 55 3A 01 00 04 00 00 01 5D 55 3A 01 00 0C 00 00 01 02 5E 55 3A 01 00 04 00 00 01 5F 55 3A 01 00 04 00 00 01 60 55 3A 01 00 0C 00 00 01 02 61 55 3A 01 00 04 00 00 01 65 55 3A 01 00 04 00 00 01 66 55 3A 01 00 0C 00 00 01 02 68 55 3A 01 00 0C 00 00 01 02 6C 55 3A 01 00 04 00 00 01 6F 55 3A 01 00 0C 00 00 01 02 70 55 3A 01 00 04 00 00 01 74 55 3A 01 00 0C 00 00 01 02 75 55 3A 01 00 0C 00 00 01 02 76 55 3A 01 00 04 00 00 01 77 55 3A 01 00 04 00 00 01 7C 55 3A 01 00 08 00 00 00 7D 55 3A 01 00 08 00 00 00 7E 55 3A 01 00 08 00 00 00 7F 55 3A 01 00 08 00 00 00 80 55 3A 01 00 08 00 00 00 81 55 3A 01 00 08 00 00 00 82 55 3A 01 00 08 00 00 00 83 55 3A 01 00 08 00 00 00 86 55 3A 01 00 08 00 00 00 87 55 3A 01 00 04 00 00 01 88 55 3A 01 00 08 00 00 00 89 55 3A 01 00 0C 00 00 01 02 8A 55 3A 01 00 0C 00 00 01 02 8C 55 3A 01 00 0C 00 00 01 02 8D 55 3A 01 00 04 00 00 01 8E 55 3A 01 00 08 00 00 00 8F 55 3A 01 00 04 00 00 01 92 55 3A 01 00 04 00 00 01 94 55 3A 01 00 04 00 00 01 98 55 3A 01 00 0C 00 00 01 02 99 55 3A 01 00 0C 00 00 01 02 9C 55 3A 01 00 0C 00 00 01 02 9D 55 3A 01 00 0C 00 00 01 02 9E 55 3A 01 00 0C 00 00 01 02 9F 55 3A 01 00 0C 00 00 01 02 A1 55 3A 01 00 08 00 00 00 A2 55 3A 01 00 08 00 00 00 A3 55 3A 01 00 08 00 00 00 61 DB 3B 01 00 04 00 00 01 62 DB 3B 01 00 04 00 00 01 63 DB 3B 01 00 04 00 00 01 64 DB 3B 01 00 08 00 00 03 65 DB 3B 01 00 0C 00 00 01 02 69 DB 3B 01 00 04 00 00 01 6C DB 3B 01 00 0C 00 00 01 02 6E DB 3B 01 00 08 00 00 03 6F DB 3B 01 00 04 00 00 01 70 DB 3B 01 00 04 00 00 01 71 DB 3B 01 00 04 00 00 01 72 DB 3B 01 00 04 00 00 01 73 DB 3B 01 00 04 00 00 01 74 DB 3B 01 00 0C 00 00 01 02 75 DB 3B 01 00 04 00 00 01 76 DB 3B 01 00 0C 00 00 01 02 77 DB 3B 01 00 0C 00 00 01 02 78 DB 3B 01 00 04 00 00 01 7F DB 3B 01 00 0C 00 00 01 02 80 DB 3B 01 00 04 00 00 01 85 DB 3B 01 00 0C 00 00 01 02 86 DB 3B 01 00 0C 00 00 01 02 8A DB 3B 01 00 04 00 00 01 8E DB 3B 01 00 08 00 00 00 8F DB 3B 01 00 08 00 00 00 90 DB 3B 01 00 08 00 00 00 93 DB 3B 01 00 0C 00 00 01 02 95 DB 3B 01 00 0C 00 00 01 02 96 DB 3B 01 00 0C 00 00 01 02 08 62 3D 01 00 04 00 00 01 09 62 3D 01 00 04 00 00 01 0A 62 3D 01 00 04 00 00 01 0B 62 3D 01 00 04 00 00 01 0C 62 3D 01 00 04 00 00 01 0D 62 3D 01 00 08 00 00 03 0E 62 3D 01 00 08 00 00 03 0F 62 3D 01 00 08 00 00 03 10 62 3D 01 00 04 00 00 01 11 62 3D 01 00 04 00 00 01 12 62 3D 01 00 04 00 00 01 13 62 3D 01 00 04 00 00 01 14 62 3D 01 00 04 00 00 01 15 62 3D 01 00 04 00 00 01 16 62 3D 01 00 04 00 00 01 17 62 3D 01 00 04 00 00 01 18 62 3D 01 00 04 00 00 01 19 62 3D 01 00 04 00 00 01 1A 62 3D 01 00 04 00 00 01 1B 62 3D 01 00 04 00 00 01 1C 62 3D 01 00 04 00 00 01 1D 62 3D 01 00 04 00 00 01 1E 62 3D 01 00 04 00 00 01 1F 62 3D 01 00 04 00 00 01 20 62 3D 01 00 04 00 00 01 21 62 3D 01 00 04 00 00 01 22 62 3D 01 00 04 00 00 01 23 62 3D 01 00 04 00 00 01 24 62 3D 01 00 04 00 00 01 25 62 3D 01 00 04 00 00 01 26 62 3D 01 00 04 00 00 01 27 62 3D 01 00 04 00 00 01 28 62 3D 01 00 04 00 00 01 29 62 3D 01 00 04 00 00 01 2D 62 3D 01 00 04 00 00 01 2E 62 3D 01 00 04 00 00 01 30 62 3D 01 00 04 00 00 01 31 62 3D 01 00 04 00 00 01 32 62 3D 01 00 04 00 00 01 33 62 3D 01 00 04 00 00 01 34 62 3D 01 00 04 00 00 01 36 62 3D 01 00 04 00 00 01 37 62 3D 01 00 04 00 00 01 38 62 3D 01 00 04 00 00 01 39 62 3D 01 00 04 00 00 01 3B 62 3D 01 00 04 00 00 01 3C 62 3D 01 00 04 00 00 01 3D 62 3D 01 00 04 00 00 01 3E 62 3D 01 00 04 00 00 01 3F 62 3D 01 00 04 00 00 01 40 62 3D 01 00 04 00 00 01 41 62 3D 01 00 04 00 00 01 42 62 3D 01 00 04 00 00 01 43 62 3D 01 00 04 00 00 01 44 62 3D 01 00 04 00 00 01 45 62 3D 01 00 04 00 00 01 46 62 3D 01 00 04 00 00 01 47 62 3D 01 00 04 00 00 01 48 62 3D 01 00 04 00 00 01 49 62 3D 01 00 04 00 00 01 4A 62 3D 01 00 04 00 00 01 4B 62 3D 01 00 04 00 00 01 4C 62 3D 01 00 0C 00 00 01 02 4D 62 3D 01 00 04 00 00 01 4E 62 3D 01 00 04 00 00 01 4F 62 3D 01 00 04 00 00 01 50 62 3D 01 00 04 00 00 01 51 62 3D 01 00 04 00 00 01 52 62 3D 01 00 04 00 00 01 53 62 3D 01 00 04 00 00 01 54 62 3D 01 00 04 00 00 01 55 62 3D 01 00 04 00 00 01 56 62 3D 01 00 0C 00 00 01 02 58 62 3D 01 00 04 00 00 01 59 62 3D 01 00 04 00 00 01 5D 62 3D 01 00 0C 00 00 01 02 5E 62 3D 01 00 08 00 00 03 5F 62 3D 01 00 04 00 00 01 60 62 3D 01 00 04 00 00 01 62 62 3D 01 00 04 00 00 01 63 62 3D 01 00 04 00 00 01 64 62 3D 01 00 04 00 00 01 65 62 3D 01 00 04 00 00 01 66 62 3D 01 00 04 00 00 01 67 62 3D 01 00 0C 00 00 01 02 6E 62 3D 01 00 04 00 00 01 6F 62 3D 01 00 04 00 00 01 70 62 3D 01 00 04 00 00 01 71 62 3D 01 00 04 00 00 01 72 62 3D 01 00 04 00 00 01 73 62 3D 01 00 04 00 00 01 74 62 3D 01 00 04 00 00 01 77 62 3D 01 00 04 00 00 01 78 62 3D 01 00 04 00 00 01 79 62 3D 01 00 04 00 00 01 7A 62 3D 01 00 04 00 00 01 7B 62 3D 01 00 04 00 00 01 7C 62 3D 01 00 08 00 00 03 7D 62 3D 01 00 04 00 00 01 7F 62 3D 01 00 04 00 00 01 84 62 3D 01 00 0C 00 00 01 02 85 62 3D 01 00 04 00 00 01 86 62 3D 01 00 04 00 00 01 89 62 3D 01 00 04 00 00 01 8A 62 3D 01 00 0C 00 00 01 02 8D 62 3D 01 00 04 00 00 01 8E 62 3D 01 00 04 00 00 01 8F 62 3D 01 00 04 00 00 01 90 62 3D 01 00 04 00 00 01 91 62 3D 01 00 04 00 00 01 94 62 3D 01 00 04 00 00 01 95 62 3D 01 00 0C 00 00 01 02 96 62 3D 01 00 04 00 00 01 97 62 3D 01 00 04 00 00 01 98 62 3D 01 00 0C 00 00 01 02 99 62 3D 01 00 04 00 00 01 9A 62 3D 01 00 0C 00 00 01 02 9B 62 3D 01 00 04 00 00 01 9C 62 3D 01 00 04 00 00 01 9D 62 3D 01 00 04 00 00 01 A2 62 3D 01 00 0C 00 00 01 02 A3 62 3D 01 00 08 00 00 03 A4 62 3D 01 00 04 00 00 01 A5 62 3D 01 00 04 00 00 01 A6 62 3D 01 00 04 00 00 01 A7 62 3D 01 00 08 00 00 03 A8 62 3D 01 00 08 00 00 03 A9 62 3D 01 00 08 00 00 03 AA 62 3D 01 00 08 00 00 03 AB 62 3D 01 00 04 00 00 01 AC 62 3D 01 00 08 00 00 03 AD 62 3D 01 00 0C 00 00 01 02 AE 62 3D 01 00 04 00 00 01 B0 62 3D 01 00 04 00 00 01 B1 62 3D 01 00 04 00 00 01 B2 62 3D 01 00 04 00 00 01 B3 62 3D 01 00 04 00 00 01 B4 62 3D 01 00 04 00 00 01 B8 62 3D 01 00 0C 00 00 01 02 B9 62 3D 01 00 0C 00 00 01 02 BA 62 3D 01 00 0C 00 00 01 02 BB 62 3D 01 00 0C 00 00 01 02 BC 62 3D 01 00 04 00 00 01 BD 62 3D 01 00 04 00 00 01 BE 62 3D 01 00 04 00 00 01 BF 62 3D 01 00 04 00 00 01 C0 62 3D 01 00 04 00 00 01 C1 62 3D 01 00 04 00 00 01 C2 62 3D 01 00 04 00 00 01 C3 62 3D 01 00 0C 00 00 01 02 C5 62 3D 01 00 04 00 00 01 C6 62 3D 01 00 08 00 00 00 C7 62 3D 01 00 0C 00 00 01 02 C8 62 3D 01 00 08 00 00 03 C9 62 3D 01 00 08 00 00 00 CA 62 3D 01 00 0C 00 00 01 02 CB 62 3D 01 00 08 00 00 00 CC 62 3D 01 00 0C 00 00 01 02 CD 62 3D 01 00 08 00 00 00 CE 62 3D 01 00 04 00 00 01 CF 62 3D 01 00 04 00 00 01 D0 62 3D 01 00 04 00 00 01 D1 62 3D 01 00 0C 00 00 01 02 D2 62 3D 01 00 04 00 00 01 D3 62 3D 01 00 04 00 00 01 D4 62 3D 01 00 0C 00 00 01 02 D5 62 3D 01 00 04 00 00 01 D6 62 3D 01 00 04 00 00 01 D7 62 3D 01 00 04 00 00 01 D8 62 3D 01 00 04 00 00 01 D9 62 3D 01 00 04 00 00 01 DA 62 3D 01 00 08 00 00 00 DE 62 3D 01 00 0C 00 00 01 02 DF 62 3D 01 00 08 00 00 00 E0 62 3D 01 00 04 00 00 01 E1 62 3D 01 00 04 00 00 01 E2 62 3D 01 00 04 00 00 01 E3 62 3D 01 00 04 00 00 01 E4 62 3D 01 00 04 00 00 01 EA 62 3D 01 00 08 00 00 00 EB 62 3D 01 00 08 00 00 00 EC 62 3D 01 00 08 00 00 00 ED 62 3D 01 00 04 00 00 01 EE 62 3D 01 00 08 00 00 00 EF 62 3D 01 00 08 00 00 00 F0 62 3D 01 00 08 00 00 00 F1 62 3D 01 00 08 00 00 00 F2 62 3D 01 00 04 00 00 01 F3 62 3D 01 00 04 00 00 01 F4 62 3D 01 00 0C 00 00 01 02 F5 62 3D 01 00 0C 00 00 01 02 F6 62 3D 01 00 0C 00 00 01 02 F7 62 3D 01 00 0C 00 00 01 02 F8 62 3D 01 00 0C 00 00 01 02 F9 62 3D 01 00 08 00 00 00 FA 62 3D 01 00 08 00 00 00 FB 62 3D 01 00 0C 00 00 01 02 FC 62 3D 01 00 04 00 00 01 FD 62 3D 01 00 08 00 00 00 FE 62 3D 01 00 0C 00 00 01 02 FF 62 3D 01 00 08 00 00 00 00 63 3D 01 00 0C 00 00 01 02 01 63 3D 01 00 04 00 00 01 02 63 3D 01 00 0C 00 00 01 02 03 63 3D 01 00 0C 00 00 01 02 04 63 3D 01 00 0C 00 00 01 02 05 63 3D 01 00 04 00 00 01 06 63 3D 01 00 08 00 00 00 07 63 3D 01 00 08 00 00 00 08 63 3D 01 00 04 00 00 01 0A 63 3D 01 00 04 00 00 01 0C 63 3D 01 00 08 00 00 00 0D 63 3D 01 10 0C 00 00 64 01 02 0E 63 3D 01 10 0C 00 00 64 01 02 0F 63 3D 01 10 0C 00 00 64 01 02 10 63 3D 01 10 0C 00 00 64 01 02 11 63 3D 01 00 0C 00 00 01 02 12 63 3D 01 00 08 00 00 00 13 63 3D 01 00 08 00 00 00 14 63 3D 01 00 08 00 00 00 A8 E8 3E 01 00 04 00 00 01 AA E8 3E 01 00 04 00 00 01 AB E8 3E 01 00 0C 00 00 01 02 AC E8 3E 01 00 04 00 00 01 AD E8 3E 01 00 04 00 00 01 AE E8 3E 01 00 04 00 00 01 B0 E8 3E 01 00 04 00 00 01 B1 E8 3E 01 00 04 00 00 01 B2 E8 3E 01 00 04 00 00 01 B3 E8 3E 01 00 04 00 00 01 B4 E8 3E 01 00 04 00 00 01 B5 E8 3E 01 00 0C 00 00 01 02 B6 E8 3E 01 00 0C 00 00 01 02 B7 E8 3E 01 00 04 00 00 01 B8 E8 3E 01 00 04 00 00 01 B9 E8 3E 01 00 0C 00 00 01 02 BA E8 3E 01 00 04 00 00 01 BB E8 3E 01 00 04 00 00 01 BC E8 3E 01 00 04 00 00 01 BD E8 3E 01 00 04 00 00 01 BE E8 3E 01 00 04 00 00 01 BF E8 3E 01 00 04 00 00 01 C0 E8 3E 01 00 04 00 00 01 C1 E8 3E 01 00 04 00 00 01 C2 E8 3E 01 00 04 00 00 01 C3 E8 3E 01 00 04 00 00 01 C4 E8 3E 01 00 04 00 00 01 C5 E8 3E 01 00 04 00 00 01 C6 E8 3E 01 00 0C 00 00 01 02 C7 E8 3E 01 00 04 00 00 01 C8 E8 3E 01 00 04 00 00 01 CA E8 3E 01 00 04 00 00 01 CB E8 3E 01 00 04 00 00 01 CC E8 3E 01 00 0C 00 00 01 02 CD E8 3E 01 00 04 00 00 01 CE E8 3E 01 00 0C 00 00 01 02 D2 E8 3E 01 00 04 00 00 01 D5 E8 3E 01 00 04 00 00 01 D6 E8 3E 01 00 04 00 00 01 D7 E8 3E 01 00 04 00 00 01 D8 E8 3E 01 00 04 00 00 01 D9 E8 3E 01 00 04 00 00 01 DA E8 3E 01 00 04 00 00 01 DB E8 3E 01 00 04 00 00 01 DC E8 3E 01 00 04 00 00 01 DD E8 3E 01 00 0C 00 00 01 02 DE E8 3E 01 00 0C 00 00 01 02 DF E8 3E 01 00 0C 00 00 01 02 E0 E8 3E 01 00 04 00 00 01 E1 E8 3E 01 00 04 00 00 01 E4 E8 3E 01 00 0C 00 00 01 02 E5 E8 3E 01 00 0C 00 00 01 02 E8 E8 3E 01 00 08 00 00 03 E9 E8 3E 01 00 04 00 00 01 EA E8 3E 01 00 0C 00 00 01 02 EB E8 3E 01 00 0C 00 00 01 02 EC E8 3E 01 00 0C 00 00 01 02 ED E8 3E 01 10 08 00 00 5A 02 EE E8 3E 01 00 08 00 00 03 EF E8 3E 01 00 08 00 00 03 F0 E8 3E 01 00 0C 00 00 01 02 F1 E8 3E 01 00 04 00 00 01 F2 E8 3E 01 00 04 00 00 01 F3 E8 3E 01 00 04 00 00 01 F4 E8 3E 01 00 0C 00 00 01 02 F5 E8 3E 01 00 0C 00 00 01 02 F6 E8 3E 01 00 0C 00 00 01 02 F9 E8 3E 01 00 0C 00 00 01 02 FA E8 3E 01 00 0C 00 00 01 02 FB E8 3E 01 00 0C 00 00 01 02 FC E8 3E 01 00 08 00 00 02 FD E8 3E 01 00 08 00 00 00 FE E8 3E 01 10 0C 00 00 61 01 02 FF E8 3E 01 00 08 00 00 00 00 E9 3E 01 10 0C 00 00 61 01 02 01 E9 3E 01 00 08 00 00 00 02 E9 3E 01 00 08 00 00 00 03 E9 3E 01 00 08 00 00 00 51 6F 40 01 00 04 00 00 01 52 6F 40 01 00 04 00 00 01 53 6F 40 01 00 04 00 00 01 54 6F 40 01 00 04 00 00 01 55 6F 40 01 00 04 00 00 01 56 6F 40 01 00 04 00 00 01 57 6F 40 01 00 04 00 00 01 58 6F 40 01 00 0C 00 00 01 02 59 6F 40 01 00 04 00 00 01 5A 6F 40 01 00 04 00 00 01 5B 6F 40 01 00 04 00 00 01 5C 6F 40 01 00 0C 00 00 01 02 5D 6F 40 01 00 04 00 00 01 5E 6F 40 01 00 04 00 00 01 5F 6F 40 01 00 04 00 00 01 60 6F 40 01 00 08 00 00 03 62 6F 40 01 00 04 00 00 01 63 6F 40 01 00 08 00 00 03 64 6F 40 01 00 04 00 00 01 E0 F5 41 01 00 0C 00 00 01 02 E1 F5 41 01 00 04 00 00 01 E2 F5 41 01 00 04 00 00 01 E3 F5 41 01 00 04 00 00 01 E4 F5 41 01 00 04 00 00 01 E5 F5 41 01 00 04 00 00 01 E6 F5 41 01 00 04 00 00 01 E7 F5 41 01 00 04 00 00 01 E8 F5 41 01 00 04 00 00 01 E9 F5 41 01 00 04 00 00 01 EA F5 41 01 00 04 00 00 01 EB F5 41 01 00 04 00 00 01 EC F5 41 01 00 0C 00 00 01 02 ED F5 41 01 00 04 00 00 01 EE F5 41 01 00 04 00 00 01 F1 F5 41 01 00 04 00 00 01 F2 F5 41 01 00 04 00 00 01 F3 F5 41 01 00 04 00 00 01 F4 F5 41 01 00 04 00 00 01 F6 F5 41 01 00 04 00 00 01 F7 F5 41 01 00 04 00 00 01 F8 F5 41 01 00 04 00 00 01 F9 F5 41 01 00 0C 00 00 01 02 FA F5 41 01 00 08 00 00 03 FB F5 41 01 00 08 00 00 03 FC F5 41 01 00 0C 00 00 01 02 FD F5 41 01 00 08 00 00 03 FE F5 41 01 00 04 00 00 01 FF F5 41 01 00 04 00 00 01 00 F6 41 01 00 04 00 00 01 01 F6 41 01 00 04 00 00 01 02 F6 41 01 00 0C 00 00 01 02 03 F6 41 01 00 04 00 00 01 04 F6 41 01 00 04 00 00 01 08 F6 41 01 00 04 00 00 01 09 F6 41 01 00 04 00 00 01 0D F6 41 01 00 04 00 00 01 0E F6 41 01 00 04 00 00 01 0F F6 41 01 00 04 00 00 01 11 F6 41 01 00 08 00 00 03 12 F6 41 01 00 04 00 00 01 13 F6 41 01 00 04 00 00 01 14 F6 41 01 00 04 00 00 01 19 F6 41 01 00 04 00 00 01 1A F6 41 01 00 0C 00 00 01 02 1B F6 41 01 00 08 00 00 03 1D F6 41 01 00 04 00 00 01 1E F6 41 01 00 04 00 00 01 1F F6 41 01 00 04 00 00 01 20 F6 41 01 00 04 00 00 01 21 F6 41 01 00 04 00 00 01 22 F6 41 01 00 04 00 00 01 23 F6 41 01 00 04 00 00 01 24 F6 41 01 00 04 00 00 01 25 F6 41 01 00 04 00 00 01 29 F6 41 01 00 04 00 00 01 2C F6 41 01 00 0C 00 00 01 02 2F F6 41 01 00 0C 00 00 01 02 30 F6 41 01 00 0C 00 00 01 02 33 F6 41 01 00 04 00 00 01 34 F6 41 01 00 04 00 00 01 36 F6 41 01 00 0C 00 00 01 02 37 F6 41 01 00 04 00 00 01 38 F6 41 01 00 04 00 00 01 39 F6 41 01 00 04 00 00 01 3C F6 41 01 00 0C 00 00 01 02 3E F6 41 01 00 0C 00 00 01 02 42 F6 41 01 00 0C 00 00 01 02 43 F6 41 01 00 08 00 00 00 44 F6 41 01 00 08 00 00 00 47 F6 41 01 00 08 00 00 03 48 F6 41 01 00 08 00 00 03 4A F6 41 01 00 04 00 00 01 4B F6 41 01 00 04 00 00 01 4C F6 41 01 00 08 00 00 03 4F F6 41 01 00 08 00 00 00 50 F6 41 01 00 08 00 00 00 51 F6 41 01 00 08 00 00 00 52 F6 41 01 00 08 00 00 00 53 F6 41 01 00 08 00 00 00 54 F6 41 01 00 08 00 00 00 55 F6 41 01 00 08 00 00 00 56 F6 41 01 00 0C 00 00 01 02 59 F6 41 01 00 0C 00 00 01 02 5A F6 41 01 00 04 00 00 01 5B F6 41 01 00 08 00 00 00 5C F6 41 01 00 04 00 00 01 5D F6 41 01 00 0C 00 00 01 02 5E F6 41 01 00 0C 00 00 01 02 5F F6 41 01 00 0C 00 00 01 02 60 F6 41 01 00 08 00 00 00 61 F6 41 01 00 08 00 00 00 62 F6 41 01 00 08 00 00 00 63 F6 41 01 00 04 00 00 01 64 F6 41 01 00 08 00 00 00 65 F6 41 01 00 04 00 00 01 67 F6 41 01 00 04 00 00 01 69 F6 41 01 00 0C 00 00 01 02 6A F6 41 01 00 04 00 00 01 6B F6 41 01 00 08 00 00 00 6C F6 41 01 00 0C 00 00 01 02 6D F6 41 01 00 0C 00 00 01 02 6E F6 41 01 00 0C 00 00 01 02 6F F6 41 01 00 08 00 00 00 70 F6 41 01 00 08 00 00 00 71 F6 41 01 00 08 00 00 00 80 7C 43 01 00 04 00 00 01 81 7C 43 01 00 04 00 00 01 86 7C 43 01 00 04 00 00 01 8F 7C 43 01 00 04 00 00 01 97 7C 43 01 00 04 00 00 01 9A 7C 43 01 00 04 00 00 01 9D 7C 43 01 00 04 00 00 01 9E 7C 43 01 00 08 00 00 02 9F 7C 43 01 00 08 00 00 02 A0 7C 43 01 00 0C 00 00 01 02 A5 7C 43 01 00 08 00 00 02 A8 7C 43 01 00 0C 00 00 01 02 AB 7C 43 01 00 0C 00 00 01 02 AC 7C 43 01 00 08 00 00 00 AD 7C 43 01 00 08 00 00 00 80 C3 C9 01 00 08 00 00 02 82 C3 C9 01 00 04 00 00 01 83 C3 C9 01 00 04 00 00 01 84 C3 C9 01 00 04 00 00 01 85 C3 C9 01 00 04 00 00 01 86 C3 C9 01 00 08 00 00 02 88 C3 C9 01 00 04 00 00 01 89 C3 C9 01 00 04 00 00 01 8A C3 C9 01 00 04 00 00 01 8B C3 C9 01 00 04 00 00 01 8C C3 C9 01 00 04 00 00 01 8D C3 C9 01 00 04 00 00 01 8E C3 C9 01 00 04 00 00 01 8F C3 C9 01 00 04 00 00 01 90 C3 C9 01 00 04 00 00 01 91 C3 C9 01 00 04 00 00 01 92 C3 C9 01 00 04 00 00 01 93 C3 C9 01 00 04 00 00 01 96 C3 C9 01 00 08 00 00 03 97 C3 C9 01 00 08 00 00 03 9A C3 C9 01 00 04 00 00 01 9B C3 C9 01 00 04 00 00 01 9C C3 C9 01 00 04 00 00 01 9D C3 C9 01 00 0C 00 00 01 02 9E C3 C9 01 00 04 00 00 01 9F C3 C9 01 00 04 00 00 01 A0 C3 C9 01 00 04 00 00 01 A1 C3 C9 01 00 04 00 00 01 A8 C3 C9 01 00 04 00 00 01 A9 C3 C9 01 00 0C 00 00 01 02 AA C3 C9 01 00 04 00 00 01 AB C3 C9 01 00 0C 00 00 01 02 AE C3 C9 01 00 04 00 00 01 AF C3 C9 01 00 0C 00 00 01 02 B1 C3 C9 01 00 08 00 00 03 B2 C3 C9 01 00 08 00 00 03 B3 C3 C9 01 00 08 00 00 03 B4 C3 C9 01 00 08 00 00 03 B5 C3 C9 01 00 08 00 00 03 B6 C3 C9 01 00 08 00 00 03 B7 C3 C9 01 00 08 00 00 03 B8 C3 C9 01 00 08 00 00 03 B9 C3 C9 01 00 08 00 00 03 BA C3 C9 01 00 08 00 00 03 BB C3 C9 01 00 08 00 00 03 BC C3 C9 01 00 08 00 00 03 BD C3 C9 01 00 08 00 00 03 BE C3 C9 01 00 08 00 00 03 BF C3 C9 01 00 08 00 00 03 C0 C3 C9 01 00 08 00 00 03 C1 C3 C9 01 00 08 00 00 03 C2 C3 C9 01 00 08 00 00 03 C3 C3 C9 01 00 08 00 00 03 C4 C3 C9 01 00 08 00 00 03 C7 C3 C9 01 00 08 00 00 03 C8 C3 C9 01 00 08 00 00 03 C9 C3 C9 01 00 08 00 00 03 CA C3 C9 01 00 08 00 00 03 CB C3 C9 01 00 08 00 00 03 CC C3 C9 01 00 08 00 00 03 CD C3 C9 01 00 08 00 00 03 CE C3 C9 01 00 08 00 00 03 D1 C3 C9 01 00 08 00 00 03 D2 C3 C9 01 00 08 00 00 03 D3 C3 C9 01 00 08 00 00 03 D4 C3 C9 01 00 08 00 00 03 D5 C3 C9 01 00 08 00 00 03 D6 C3 C9 01 00 08 00 00 03 D9 C3 C9 01 00 04 00 00 01 DA C3 C9 01 00 0C 00 00 01 02 DD C3 C9 01 00 04 00 00 01 DE C3 C9 01 00 04 00 00 01 20 4A CB 01 00 0C 00 00 01 02 21 4A CB 01 00 0C 00 00 01 02 22 4A CB 01 00 04 00 00 01 23 4A CB 01 00 04 00 00 01 24 4A CB 01 00 04 00 00 01 25 4A CB 01 00 04 00 00 01 26 4A CB 01 00 04 00 00 01 27 4A CB 01 00 04 00 00 01 28 4A CB 01 00 0C 00 00 01 02 29 4A CB 01 00 04 00 00 01 2C 4A CB 01 00 04 00 00 01 2D 4A CB 01 00 04 00 00 01 2E 4A CB 01 00 0C 00 00 01 02 2F 4A CB 01 00 0C 00 00 01 02 36 4A CB 01 00 04 00 00 01 37 4A CB 01 00 04 00 00 01 38 4A CB 01 00 04 00 00 01 39 4A CB 01 00 04 00 00 01 3A 4A CB 01 00 04 00 00 01 3B 4A CB 01 00 04 00 00 01 4A 4A CB 01 00 04 00 00 01 4B 4A CB 01 00 04 00 00 01 4C 4A CB 01 00 04 00 00 01 4D 4A CB 01 00 04 00 00 01 4E 4A CB 01 00 04 00 00 01 4F 4A CB 01 00 04 00 00 01 50 4A CB 01 00 04 00 00 01 51 4A CB 01 00 04 00 00 01 52 4A CB 01 00 04 00 00 01 53 4A CB 01 00 04 00 00 01 54 4A CB 01 00 04 00 00 01 55 4A CB 01 00 04 00 00 01 56 4A CB 01 00 04 00 00 01 57 4A CB 01 00 04 00 00 01 58 4A CB 01 00 04 00 00 01 59 4A CB 01 00 04 00 00 01 5A 4A CB 01 00 04 00 00 01 5B 4A CB 01 00 04 00 00 01 5C 4A CB 01 00 04 00 00 01 5D 4A CB 01 00 04 00 00 01 5E 4A CB 01 00 04 00 00 01 5F 4A CB 01 00 0C 00 00 01 02 60 4A CB 01 00 0C 00 00 01 02 67 4A CB 01 00 04 00 00 01 68 4A CB 01 00 04 00 00 01 69 4A CB 01 00 04 00 00 01 75 4A CB 01 00 0C 00 00 01 02 76 4A CB 01 00 08 00 00 03 77 4A CB 01 00 08 00 00 03 78 4A CB 01 00 08 00 00 03 7A 4A CB 01 00 04 00 00 01 7B 4A CB 01 00 0C 00 00 01 02 7C 4A CB 01 00 0C 00 00 01 02 7E 4A CB 01 00 08 00 00 03 7F 4A CB 01 00 08 00 00 03 80 4A CB 01 00 08 00 00 00 81 4A CB 01 00 08 00 00 03 82 4A CB 01 00 08 00 00 03 83 4A CB 01 00 04 00 00 01 C0 D0 CC 01 00 04 00 00 01 C1 D0 CC 01 00 0C 00 00 01 02 C2 D0 CC 01 00 0C 00 00 01 02 C3 D0 CC 01 00 04 00 00 01 C4 D0 CC 01 00 04 00 00 01 C5 D0 CC 01 00 04 00 00 01 C6 D0 CC 01 00 04 00 00 01 C7 D0 CC 01 00 04 00 00 01 C8 D0 CC 01 00 04 00 00 01 CA D0 CC 01 00 04 00 00 01 CB D0 CC 01 00 04 00 00 01 CC D0 CC 01 00 04 00 00 01 D0 D0 CC 01 00 0C 00 00 01 02 D1 D0 CC 01 00 04 00 00 01 D2 D0 CC 01 00 0C 00 00 01 02 D4 D0 CC 01 00 08 00 00 02 D8 D0 CC 01 00 08 00 00 02 D9 D0 CC 01 00 04 00 00 01 DB D0 CC 01 00 04 00 00 01 DC D0 CC 01 00 04 00 00 01 DD D0 CC 01 00 04 00 00 01 DE D0 CC 01 00 0C 00 00 01 02 E0 D0 CC 01 00 08 00 00 03 E2 D0 CC 01 00 08 00 00 03 E3 D0 CC 01 00 08 00 00 03 E7 D0 CC 01 00 04 00 00 01 E8 D0 CC 01 00 04 00 00 01 E9 D0 CC 01 00 04 00 00 01 EA D0 CC 01 00 04 00 00 01 EB D0 CC 01 00 04 00 00 01 ED D0 CC 01 00 0C 00 00 01 02 EE D0 CC 01 00 0C 00 00 01 02 F0 D0 CC 01 10 08 00 00 66 03 F3 D0 CC 01 10 08 00 00 66 03 F6 D0 CC 01 00 0C 00 00 01 02 F7 D0 CC 01 00 0C 00 00 01 02 F8 D0 CC 01 00 08 00 00 00 F9 D0 CC 01 00 08 00 00 00 FA D0 CC 01 00 08 00 00 00 FB D0 CC 01 00 08 00 00 00 FC D0 CC 01 00 0C 00 00 01 02 FD D0 CC 01 10 0C 00 00 65 01 02 FE D0 CC 01 00 0C 00 00 01 03 85 F0 FA 02 00 08 00 00 02 87 F0 FA 02 00 08 00 00 02 89 F0 FA 02 00 08 00 00 02 8A F0 FA 02 00 08 00 00 02 A0 F0 FA 02 00 04 00 00 01 A1 F0 FA 02 00 04 00 00 01 A2 F0 FA 02 00 04 00 00 01 A3 F0 FA 02 00 04 00 00 01 A4 F0 FA 02 00 04 00 00 01 A5 F0 FA 02 00 04 00 00 01 A6 F0 FA 02 00 04 00 00 01 A7 F0 FA 02 00 04 00 00 01 D0 F0 FA 02 00 0C 00 00 01 02 D9 F0 FA 02 00 0C 00 00 01 02 DA F0 FA 02 00 04 00 00 01 DB F0 FA 02 00 04 00 00 01 DC F0 FA 02 00 0C 00 00 01 02 DD F0 FA 02 00 04 00 00 01 DE F0 FA 02 00 0C 00 00 01 02 DF F0 FA 02 00 0C 00 00 01 02 E2 F0 FA 02 10 0C 00 00 65 01 02 27 77 FC 02 00 0C 00 00 01 02 28 77 FC 02 00 04 00 00 01 29 77 FC 02 00 0C 00 00 01 02 2A 77 FC 02 00 04 00 00 01"));
            mplew.write(HexTool.getByteArrayFromHexString("2B 77 FC 02 00 04 00 00 01 2C 77 FC 02 00 04 00 00 01 2D 77 FC 02 00 0C 00 00 01 02 2E 77 FC 02 00 04 00 00 01 2F 77 FC 02 00 04 00 00 01 30 77 FC 02 00 0C 00 00 01 02 31 77 FC 02 00 04 00 00 01 32 77 FC 02 00 04 00 00 01 33 77 FC 02 00 04 00 00 01 3F 77 FC 02 00 04 00 00 01 40 77 FC 02 00 04 00 00 01 C2 FD FD 02 00 04 00 00 01 C3 FD FD 02 00 0C 00 00 01 02 C4 FD FD 02 00 04 00 00 01 C5 FD FD 02 00 0C 00 00 01 02 C6 FD FD 02 00 04 00 00 01 C7 FD FD 02 00 04 00 00 01 C8 FD FD 02 00 04 00 00 01 C9 FD FD 02 00 04 00 00 01 CA FD FD 02 00 04 00 00 01 CB FD FD 02 00 04 00 00 01 CC FD FD 02 00 0C 00 00 01 02 CD FD FD 02 00 0C 00 00 01 02 CE FD FD 02 00 0C 00 00 01 02 CF FD FD 02 00 0C 00 00 01 02 D1 FD FD 02 00 04 00 00 01 D2 FD FD 02 00 04 00 00 01 D3 FD FD 02 00 04 00 00 01 D4 FD FD 02 00 04 00 00 01 D5 FD FD 02 00 04 00 00 01 DA FD FD 02 00 04 00 00 01 DB FD FD 02 00 04 00 00 01 DC FD FD 02 00 0C 00 00 01 02 DD FD FD 02 00 0C 00 00 01 02 DE FD FD 02 00 0C 00 00 01 01 DF FD FD 02 00 0C 00 00 01 02 E0 FD FD 02 00 0C 00 00 01 02 E1 FD FD 02 00 0C 00 00 01 02 E2 FD FD 02 00 04 00 00 01 E3 FD FD 02 00 04 00 00 01 E4 FD FD 02 00 04 00 00 01 E5 FD FD 02 00 04 00 00 01 E7 FD FD 02 00 04 00 00 01 E8 FD FD 02 00 04 00 00 01 E9 FD FD 02 00 04 00 00 01 EA FD FD 02 00 04 00 00 01 EB FD FD 02 00 04 00 00 01 F8 FD FD 02 00 08 00 00 00 F9 FD FD 02 00 04 00 00 01 FA FD FD 02 00 04 00 00 01 FE FD FD 02 00 0C 00 00 01 02 FF FD FD 02 00 0C 00 00 01 02 00 FE FD 02 00 0C 00 00 01 02 01 FE FD 02 00 0C 00 00 01 02 02 FE FD 02 10 0C 00 00 65 01 02 03 FE FD 02 10 0C 00 00 65 01 02 04 FE FD 02 10 04 00 00 65 01 05 FE FD 02 10 04 00 00 65 01 06 FE FD 02 14 0C 00 00 65 B8 0B 00 00 01 01 09 FE FD 02 10 00 00 00 65 0A FE FD 02 10 0C 00 00 66 01 02 0B FE FD 02 10 0C 00 00 66 01 02 60 84 FF 02 00 0C 00 00 01 02 6B 84 FF 02 00 08 00 00 00 6C 84 FF 02 00 08 00 00 00 01 0B 01 03 00 04 00 00 01 02 0B 01 03 00 04 00 00 01 0D 0B 01 03 00 04 00 00 01 0E 0B 01 03 00 0C 00 00 01 02 0F 0B 01 03 00 0C 00 00 01 02 10 0B 01 03 00 0C 00 00 01 02 11 0B 01 03 00 04 00 00 01 12 0B 01 03 00 04 00 00 01 13 0B 01 03 00 0C 00 00 01 02 14 0B 01 03 00 08 00 00 02 15 0B 01 03 00 08 00 00 02 1D 0B 01 03 00 04 00 00 01 1E 0B 01 03 00 04 00 00 01 1F 0B 01 03 00 04 00 00 01 20 0B 01 03 00 04 00 00 01 25 0B 01 03 10 0C 00 00 67 01 03 26 0B 01 03 10 08 00 00 66 03 27 0B 01 03 10 0C 00 00 67 01 03 29 0B 01 03 00 08 00 00 02 2A 0B 01 03 00 08 00 00 03 2B 0B 01 03 00 08 00 00 03 2E 0B 01 03 00 04 00 00 01 2F 0B 01 03 00 04 00 00 01 37 0B 01 03 00 0C 00 00 01 02 3C 0B 01 03 00 0C 00 00 01 02 3D 0B 01 03 00 0C 00 00 01 02 3F 0B 01 03 00 08 00 00 02 42 0B 01 03 00 04 00 00 01 44 0B 01 03 00 04 00 00 01 45 0B 01 03 00 04 00 00 01 46 0B 01 03 00 04 00 00 01 47 0B 01 03 00 04 00 00 01 48 0B 01 03 00 04 00 00 01 49 0B 01 03 00 0C 00 00 01 02 61 0B 01 03 00 08 00 00 00 62 0B 01 03 00 08 00 00 00 63 0B 01 03 00 08 00 00 00 64 0B 01 03 00 08 00 00 00 65 0B 01 03 00 08 00 00 00 66 0B 01 03 00 08 00 00 00 67 0B 01 03 00 08 00 00 00 68 0B 01 03 00 08 00 00 00 6B 0B 01 03 00 04 00 00 01 6C 0B 01 03 00 04 00 00 01 6D 0B 01 03 00 04 00 00 01 6E 0B 01 03 00 04 00 00 01 7B 0B 01 03 00 08 00 00 02 7C 0B 01 03 00 0C 00 00 01 02 7D 0B 01 03 00 08 00 00 02 7F 0B 01 03 00 08 00 00 00 80 0B 01 03 00 08 00 00 00 81 0B 01 03 00 08 00 00 00 87 0B 01 03 00 04 00 00 01 88 0B 01 03 00 08 00 00 03 89 0B 01 03 00 08 00 00 02 8C 0B 01 03 00 04 00 00 01 8D 0B 01 03 00 04 00 00 01 91 0B 01 03 00 04 00 00 01 92 0B 01 03 00 0C 00 00 01 02 94 0B 01 03 00 08 00 00 02 9A 0B 01 03 00 08 00 00 00 9B 0B 01 03 00 08 00 00 00 9C 0B 01 03 00 08 00 00 00 9D 0B 01 03 00 04 00 00 01 9E 0B 01 03 00 08 00 00 00 B1 0B 01 03 10 08 00 00 63 03 B2 0B 01 03 10 00 00 00 63 B3 0B 01 03 00 0C 00 00 01 02 B4 0B 01 03 00 0C 00 00 01 02 C2 0B 01 03 00 08 00 00 03 C3 0B 01 03 00 08 00 00 03 C4 0B 01 03 00 08 00 00 03 C5 0B 01 03 00 08 00 00 00 C6 0B 01 03 00 08 00 00 00 CE 0B 01 03 00 08 00 00 02 D1 0B 01 03 20 E8 00 00 01 00 03 00 00 00 00 00 00 D2 0B 01 03 00 08 00 00 03 D3 0B 01 03 20 E0 00 00 00 00 1E 00 1E 00 1E 00 D4 0B 01 03 00 08 00 00 03 D5 0B 01 03 00 0C 00 00 01 03 D6 0B 01 03 00 0C 00 00 01 02 D7 0B 01 03 00 0C 00 00 01 02 D8 0B 01 03 00 0C 00 00 01 02 D9 0B 01 03 00 0C 00 00 01 02 DA 0B 01 03 00 08 00 00 00 DB 0B 01 03 00 04 00 00 01 DC 0B 01 03 00 0C 00 00 01 02 DD 0B 01 03 00 0C 00 00 01 02 DE 0B 01 03 00 08 00 00 00 DF 0B 01 03 00 08 00 00 00 E0 0B 01 03 00 08 00 00 00 E1 0B 01 03 00 08 00 00 00 E2 0B 01 03 00 08 00 00 00 E3 0B 01 03 00 08 00 00 00 E6 0B 01 03 00 08 00 00 00 E7 0B 01 03 00 08 00 00 00 EB 0B 01 03 00 08 00 00 00 EC 0B 01 03 00 08 00 00 00 ED 0B 01 03 14 0C 00 00 66 F0 00 00 00 01 01 EE 0B 01 03 14 0C 00 00 66 B0 04 00 00 01 01 EF 0B 01 03 14 08 00 00 66 80 0C 00 00 00 F0 0B 01 03 14 0C 00 00 66 D0 07 00 00 01 01 A0 91 02 03 00 04 00 00 01 A1 91 02 03 00 04 00 00 01 A2 91 02 03 00 0C 00 00 01 02 A4 91 02 03 00 04 00 00 01 A5 91 02 03 00 04 00 00 01 A7 91 02 03 00 04 00 00 01 A8 91 02 03 00 04 00 00 01 A9 91 02 03 00 04 00 00 01 AA 91 02 03 00 04 00 00 01 AB 91 02 03 00 04 00 00 01 B1 91 02 03 00 04 00 00 01 B2 91 02 03 00 04 00 00 01 B3 91 02 03 00 04 00 00 01 B5 91 02 03 00 04 00 00 01 B6 91 02 03 00 04 00 00 01 BE 91 02 03 00 04 00 00 01 BF 91 02 03 00 04 00 00 01 C1 91 02 03 00 04 00 00 01 C2 91 02 03 00 04 00 00 01 C3 91 02 03 00 04 00 00 01 C4 91 02 03 00 04 00 00 01 C5 91 02 03 00 04 00 00 01 C6 91 02 03 00 08 00 00 03 C9 91 02 03 00 0C 00 00 01 02 CA 91 02 03 00 04 00 00 01 CB 91 02 03 00 04 00 00 01 CC 91 02 03 00 04 00 00 01 CD 91 02 03 00 04 00 00 01 CE 91 02 03 00 08 00 00 03 CF 91 02 03 00 08 00 00 03 D0 91 02 03 00 08 00 00 03 D1 91 02 03 00 08 00 00 03 D2 91 02 03 00 04 00 00 01 D3 91 02 03 00 04 00 00 01 D4 91 02 03 00 04 00 00 01 D5 91 02 03 00 04 00 00 01 D6 91 02 03 00 04 00 00 01 D7 91 02 03 00 04 00 00 01 D8 91 02 03 00 04 00 00 01 DC 91 02 03 00 08 00 00 03 DD 91 02 03 00 08 00 00 03 DE 91 02 03 00 08 00 00 03 E1 91 02 03 00 08 00 00 03 E3 91 02 03 00 04 00 00 01 F0 91 02 03 00 04 00 00 01 F1 91 02 03 00 04 00 00 01 F3 91 02 03 00 04 00 00 01 F4 91 02 03 00 04 00 00 01 F5 91 02 03 00 04 00 00 01 F6 91 02 03 00 04 00 00 01 F7 91 02 03 00 04 00 00 01 F8 91 02 03 00 0C 00 00 01 02 FA 91 02 03 00 0C 00 00 01 02 FC 91 02 03 00 0C 00 00 01 02 FD 91 02 03 00 0C 00 00 01 02 FE 91 02 03 00 08 00 00 00 FF 91 02 03 00 0C 00 00 01 02 00 92 02 03 10 0C 00 00 64 01 02 01 92 02 03 00 08 00 00 00 00 87 93 03 10 04 00 00 32 01 01 87 93 03 10 04 00 00 32 01 02 87 93 03 00 04 00 00 01 03 87 93 03 00 04 00 00 01 04 87 93 03 00 04 00 00 01 05 87 93 03 00 04 00 00 01 0B 87 93 03 00 04 00 00 01 0D 87 93 03 00 0C 00 00 01 02 0F 87 93 03 00 04 00 00 01 10 87 93 03 00 04 00 00 01 11 87 93 03 00 08 00 00 03 12 87 93 03 10 04 00 00 32 01 13 87 93 03 10 04 00 00 32 01 14 87 93 03 00 0C 00 00 01 02 17 87 93 03 00 04 00 00 01 1A 87 93 03 00 0C 00 00 01 02 1B 87 93 03 00 04 00 00 01 1C 87 93 03 00 0C 00 00 01 02 1D 87 93 03 00 04 00 00 01 1E 87 93 03 00 04 00 00 01 23 87 93 03 00 0C 00 00 01 02 29 87 93 03 00 04 00 00 01 2C 87 93 03 00 0C 00 00 01 02 2E 87 93 03 00 0C 00 00 01 02 30 87 93 03 00 08 00 00 00 31 87 93 03 00 0C 00 00 01 02 32 87 93 03 00 0C 00 00 01 02 33 87 93 03 00 08 00 00 00 34 87 93 03 10 0C 00 00 65 01 02 36 87 93 03 00 0C 00 00 01 02 37 87 93 03 00 0C 00 00 01 02 38 87 93 03 00 0C 00 00 01 02 39 87 93 03 10 08 00 00 66 03 3A 87 93 03 10 08 00 00 66 03 3B 87 93 03 10 08 00 00 66 00 3C 87 93 03 10 08 00 00 66 00 3D 87 93 03 10 08 00 00 66 03 3E 87 93 03 10 08 00 00 66 03 A1 0D 95 03 00 04 00 00 01 A2 0D 95 03 00 04 00 00 01 A3 0D 95 03 00 04 00 00 01 A4 0D 95 03 00 04 00 00 01 A5 0D 95 03 00 04 00 00 01 A6 0D 95 03 00 04 00 00 01 A7 0D 95 03 00 04 00 00 01 A8 0D 95 03 00 08 00 00 03 A9 0D 95 03 00 08 00 00 03 AA 0D 95 03 00 0C 00 00 01 02 AB 0D 95 03 00 04 00 00 01 AC 0D 95 03 00 04 00 00 01 AD 0D 95 03 00 04 00 00 01 AE 0D 95 03 00 04 00 00 01 AF 0D 95 03 00 04 00 00 01 B0 0D 95 03 00 04 00 00 01 B1 0D 95 03 00 04 00 00 01 B2 0D 95 03 00 04 00 00 01 B3 0D 95 03 00 04 00 00 01 B4 0D 95 03 00 04 00 00 01 B6 0D 95 03 00 04 00 00 01 B7 0D 95 03 00 04 00 00 01 B8 0D 95 03 00 04 00 00 01 B9 0D 95 03 00 04 00 00 01 BA 0D 95 03 00 04 00 00 01 BB 0D 95 03 00 04 00 00 01 BC 0D 95 03 00 04 00 00 01 BD 0D 95 03 00 04 00 00 01 BE 0D 95 03 00 04 00 00 01 BF 0D 95 03 00 0C 00 00 01 02 C3 0D 95 03 00 04 00 00 01 C4 0D 95 03 00 04 00 00 01 C7 0D 95 03 00 04 00 00 01 C8 0D 95 03 00 04 00 00 01 C9 0D 95 03 00 04 00 00 01 CA 0D 95 03 00 04 00 00 01 CB 0D 95 03 00 04 00 00 01 CC 0D 95 03 00 04 00 00 01 CD 0D 95 03 00 04 00 00 01 CE 0D 95 03 00 04 00 00 01 CF 0D 95 03 00 04 00 00 01 D0 0D 95 03 00 04 00 00 01 D1 0D 95 03 00 04 00 00 01 D2 0D 95 03 00 04 00 00 01 D3 0D 95 03 00 04 00 00 01 DA 0D 95 03 00 04 00 00 01 DB 0D 95 03 00 0C 00 00 01 02 DC 0D 95 03 00 04 00 00 01 DD 0D 95 03 00 04 00 00 01 DE 0D 95 03 00 04 00 00 01 DF 0D 95 03 00 04 00 00 01 E0 0D 95 03 00 04 00 00 01 E1 0D 95 03 00 0C 00 00 01 02 E2 0D 95 03 00 0C 00 00 01 02 E3 0D 95 03 00 0C 00 00 01 02 E4 0D 95 03 00 0C 00 00 01 02 E5 0D 95 03 00 0C 00 00 01 02 E7 0D 95 03 00 08 00 00 03 E8 0D 95 03 00 08 00 00 03 E9 0D 95 03 00 08 00 00 00 40 94 96 03 00 0C 00 00 01 02 41 94 96 03 00 0C 00 00 01 02 44 94 96 03 00 04 00 00 01 45 94 96 03 00 04 00 00 01 46 94 96 03 00 04 00 00 01 47 94 96 03 00 04 00 00 01 48 94 96 03 00 04 00 00 01 49 94 96 03 00 04 00 00 01 4A 94 96 03 00 04 00 00 01 4B 94 96 03 00 04 00 00 01 4C 94 96 03 00 0C 00 00 01 02 4D 94 96 03 00 0C 00 00 01 02 4E 94 96 03 00 04 00 00 01 4F 94 96 03 00 04 00 00 01 50 94 96 03 00 04 00 00 01 51 94 96 03 00 04 00 00 01 52 94 96 03 00 04 00 00 01 53 94 96 03 00 04 00 00 01 54 94 96 03 00 04 00 00 01 55 94 96 03 00 04 00 00 01 56 94 96 03 00 04 00 00 01 57 94 96 03 00 04 00 00 01 58 94 96 03 00 04 00 00 01 59 94 96 03 00 04 00 00 01 5A 94 96 03 00 0C 00 00 01 02 5B 94 96 03 00 0C 00 00 01 02 5D 94 96 03 00 04 00 00 01 5E 94 96 03 00 04 00 00 01 5F 94 96 03 00 04 00 00 01 60 94 96 03 00 04 00 00 01 62 94 96 03 00 04 00 00 01 63 94 96 03 00 0C 00 00 01 02 64 94 96 03 00 04 00 00 01 65 94 96 03 00 0C 00 00 01 02 66 94 96 03 00 04 00 00 01 67 94 96 03 00 04 00 00 01 68 94 96 03 00 04 00 00 01 69 94 96 03 00 0C 00 00 01 02 6A 94 96 03 00 04 00 00 01 6B 94 96 03 00 04 00 00 01 6C 94 96 03 00 04 00 00 01 6D 94 96 03 00 04 00 00 01 6E 94 96 03 00 04 00 00 01 70 94 96 03 00 04 00 00 01 72 94 96 03 00 04 00 00 01 75 94 96 03 00 04 00 00 01 76 94 96 03 00 04 00 00 01 77 94 96 03 00 04 00 00 01 78 94 96 03 00 04 00 00 01 7A 94 96 03 00 04 00 00 01 7B 94 96 03 00 04 00 00 01 7C 94 96 03 00 0C 00 00 01 02 7D 94 96 03 00 0C 00 00 01 02 7E 94 96 03 00 04 00 00 01 7F 94 96 03 00 04 00 00 01 80 94 96 03 00 04 00 00 01 81 94 96 03 00 04 00 00 01 82 94 96 03 00 04 00 00 01 83 94 96 03 00 0C 00 00 01 02 84 94 96 03 00 04 00 00 01 85 94 96 03 00 04 00 00 01 86 94 96 03 00 04 00 00 01 87 94 96 03 00 0C 00 00 01 02 88 94 96 03 00 0C 00 00 01 02 89 94 96 03 00 0C 00 00 01 02 8A 94 96 03 00 0C 00 00 01 02 8B 94 96 03 00 0C 00 00 01 02 8C 94 96 03 00 04 00 00 01 8D 94 96 03 00 0C 00 00 01 02 82 1D 2C 04 00 04 00 00 01 83 1D 2C 04 00 04 00 00 01 84 1D 2C 04 00 04 00 00 01 85 1D 2C 04 00 04 00 00 01 86 1D 2C 04 00 04 00 00 01 87 1D 2C 04 00 08 00 00 03 88 1D 2C 04 00 08 00 00 03 89 1D 2C 04 00 04 00 00 01 8A 1D 2C 04 00 04 00 00 01 8B 1D 2C 04 00 04 00 00 01 8C 1D 2C 04 00 04 00 00 01 8D 1D 2C 04 00 04 00 00 01 8E 1D 2C 04 00 04 00 00 01 8F 1D 2C 04 00 08 00 00 03 90 1D 2C 04 00 08 00 00 03 91 1D 2C 04 00 04 00 00 01 92 1D 2C 04 00 04 00 00 01 93 1D 2C 04 00 04 00 00 01 AC 1D 2C 04 00 0C 00 00 01 02 AD 1D 2C 04 00 0C 00 00 01 02 AE 1D 2C 04 00 0C 00 00 01 02 AF 1D 2C 04 00 04 00 00 01 B0 1D 2C 04 00 04 00 00 01 B1 1D 2C 04 00 04 00 00 01 B2 1D 2C 04 00 04 00 00 01 B3 1D 2C 04 00 04 00 00 01 B4 1D 2C 04 00 04 00 00 01 B5 1D 2C 04 00 04 00 00 01 B6 1D 2C 04 00 04 00 00 01 B7 1D 2C 04 00 04 00 00 01 B8 1D 2C 04 00 04 00 00 01 B9 1D 2C 04 00 04 00 00 01 BA 1D 2C 04 00 04 00 00 01 C1 1D 2C 04 00 04 00 00 01 C2 1D 2C 04 00 04 00 00 01 C3 1D 2C 04 00 04 00 00 01 C4 1D 2C 04 00 04 00 00 01 C7 1D 2C 04 00 04 00 00 01 CA 1D 2C 04 00 08 00 00 03 CB 1D 2C 04 00 08 00 00 03 CC 1D 2C 04 00 08 00 00 02 CE 1D 2C 04 00 04 00 00 01 CF 1D 2C 04 00 04 00 00 01 D0 1D 2C 04 00 04 00 00 01 D1 1D 2C 04 00 04 00 00 01 D2 1D 2C 04 00 04 00 00 01 D3 1D 2C 04 00 04 00 00 01 D4 1D 2C 04 00 04 00 00 01 D5 1D 2C 04 00 04 00 00 01 D6 1D 2C 04 00 04 00 00 01 D7 1D 2C 04 00 04 00 00 01 D8 1D 2C 04 00 04 00 00 01 D9 1D 2C 04 00 04 00 00 01 DA 1D 2C 04 00 04 00 00 01 DB 1D 2C 04 00 04 00 00 01 DC 1D 2C 04 00 04 00 00 01 DD 1D 2C 04 00 04 00 00 01 DE 1D 2C 04 00 04 00 00 01 DF 1D 2C 04 00 04 00 00 01 E0 1D 2C 04 00 04 00 00 01 E1 1D 2C 04 00 04 00 00 01 E2 1D 2C 04 00 04 00 00 01 E3 1D 2C 04 00 04 00 00 01 E4 1D 2C 04 00 04 00 00 01 E5 1D 2C 04 00 04 00 00 01 E6 1D 2C 04 00 04 00 00 01 E7 1D 2C 04 00 08 00 00 02 E8 1D 2C 04 00 04 00 00 01 E9 1D 2C 04 00 08 00 00 03 EA 1D 2C 04 00 08 00 00 03 EB 1D 2C 04 00 08 00 00 03 EC 1D 2C 04 00 08 00 00 03 ED 1D 2C 04 00 08 00 00 03 EE 1D 2C 04 00 04 00 00 01 EF 1D 2C 04 00 04 00 00 01 F0 1D 2C 04 00 04 00 00 01 F1 1D 2C 04 00 04 00 00 01 F2 1D 2C 04 00 04 00 00 01 F3 1D 2C 04 00 04 00 00 01 F4 1D 2C 04 00 04 00 00 01 F5 1D 2C 04 00 04 00 00 01 F6 1D 2C 04 00 04 00 00 01 F7 1D 2C 04 00 04 00 00 01 F8 1D 2C 04 00 04 00 00 01 F9 1D 2C 04 00 04 00 00 01 FB 1D 2C 04 00 04 00 00 01 FD 1D 2C 04 00 0C 00 00 01 02 09 1E 2C 04 00 04 00 00 01 0A 1E 2C 04 00 0C 00 00 01 02 0B 1E 2C 04 10 0C 00 00 69 01 03 0C 1E 2C 04 10 0C 00 00 69 01 03 0D 1E 2C 04 00 04 00 00 01 0E 1E 2C 04 00 0C 00 00 01 02 0F 1E 2C 04 00 04 00 00 01 10 1E 2C 04 00 08 00 00 02 12 1E 2C 04 00 0C 00 00 01 01 13 1E 2C 04 00 0C 00 00 01 01 14 1E 2C 04 00 08 00 00 01 16 1E 2C 04 10 08 00 00 64 03 17 1E 2C 04 10 08 00 00 64 03 18 1E 2C 04 10 08 00 00 64 03 19 1E 2C 04 00 04 00 00 01 1A 1E 2C 04 00 08 00 00 02 1B 1E 2C 04 00 04 00 00 01 1C 1E 2C 04 00 08 00 00 02 1D 1E 2C 04 00 0C 00 00 01 02 1E 1E 2C 04 00 04 00 00 01 1F 1E 2C 04 00 0C 00 00 01 02 20 1E 2C 04 00 04 00 00 01 21 1E 2C 04 00 08 00 00 02 22 1E 2C 04 00 08 00 00 02 23 1E 2C 04 00 08 00 00 02 24 1E 2C 04 00 08 00 00 02 25 1E 2C 04 00 08 00 00 02 26 1E 2C 04 00 08 00 00 02 27 1E 2C 04 00 0C 00 00 01 02 28 1E 2C 04 00 0C 00 00 01 02 29 1E 2C 04 00 04 00 00 01 2A 1E 2C 04 00 0C 00 00 01 02 2B 1E 2C 04 00 0C 00 00 01 02 2C 1E 2C 04 00 04 00 00 01 2D 1E 2C 04 10 0C 00 00 63 01 01 2E 1E 2C 04 10 0C 00 00 63 01 01 2F 1E 2C 04 10 0C 00 00 63 01 01 30 1E 2C 04 00 0C 00 00 01 02 31 1E 2C 04 00 04 00 00 01 32 1E 2C 04 00 04 00 00 01 33 1E 2C 04 00 04 00 00 01 34 1E 2C 04 00 08 00 00 02 35 1E 2C 04 00 0C 00 00 01 02 36 1E 2C 04 00 08 00 00 00 37 1E 2C 04 00 08 00 00 00 38 1E 2C 04 00 0C 00 00 01 02 39 1E 2C 04 00 0C 00 00 01 02 3A 1E 2C 04 00 0C 00 00 01 02 3B 1E 2C 04 00 0C 00 00 01 02 3C 1E 2C 04 00 0C 00 00 01 02 3D 1E 2C 04 00 0C 00 00 01 02 3E 1E 2C 04 00 0C 00 00 01 02 3F 1E 2C 04 00 0C 00 00 01 02 40 1E 2C 04 00 08 00 00 00 41 1E 2C 04 00 0C 00 00 01 02 42 1E 2C 04 00 0C 00 00 01 02 43 1E 2C 04 00 0C 00 00 01 02 44 1E 2C 04 00 08 00 00 03 45 1E 2C 04 00 08 00 00 03 46 1E 2C 04 00 08 00 00 03 47 1E 2C 04 00 0C 00 00 01 02 48 1E 2C 04 00 0C 00 00 01 02 49 1E 2C 04 00 0C 00 00 01 03 4A 1E 2C 04 00 0C 00 00 01 03 4B 1E 2C 04 00 04 00 00 01 4C 1E 2C 04 00 04 00 00 01 4D 1E 2C 04 00 04 00 00 01 4E 1E 2C 04 00 04 00 00 01 4F 1E 2C 04 10 0C 00 00 66 01 03 50 1E 2C 04 10 0C 00 00 66 01 03 51 1E 2C 04 10 0C 00 00 66 01 03 52 1E 2C 04 10 08 00 00 66 03 53 1E 2C 04 10 08 00 00 66 03 54 1E 2C 04 10 08 00 00 66 03 02 B5 C4 04 00 04 00 00 01 03 B5 C4 04 00 04 00 00 01 00 00 00 69 00 6C 00 6C 00 2F 00 35 00 32 00 32 00 31 00 30 00 30 00 34 00 2F 00 70 00 72 00 65 00 70 00 61 00 72 00 65 00 2F 00 31 00 00 00 00 00 00 00 02 00 15 00 C8 01 08 07 02 00 00 00 32 00 00 00 05 00 17 00 C6 00 08 07 A0 01 16 00 E0 26 33 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 1C 00 C3 01 08 07 02 00 00 00 32 00 00 00 01 00 00 00 00 00 00 00 EE D0 CC 01 01 00 00 00 00 00 00 00 10 0B 01 03 01 00 00 00 00 00 00 00 DB 0B 01 03 01 00 00 00 00 00 00 00 E2 F0 FA 02 01 00 00 00 00 00 00 00 D0 F0 FA 02 01 00 00 00 01 00 00 00 EE D0 CC 01 01 00 00 00 01 00 00 00 10 0B 01 03 01 00 00 00 01 00 00 00 DB 0B 01 03 01 00 00 00 01 00 00 00 E2 F0 FA 02 01 00 00 00 01 00 00 00 D0 F0 FA 02 02 00 00 00 00 00 00 00 EE D0 CC 01 02 00 00 00 00 00 00 00 10 0B 01 03 02 00 00 00 00 00 00 00 DB 0B 01 03 02 00 00 00 00 00 00 00 E2 F0 FA 02 02 00 00 00 00 00 00 00 D0 F0 FA 02 02 00 00 00 01 00 00 00 EE D0 CC 01 02 00 00 00 01 00 00 00 10 0B 01 03 02 00 00 00 01 00 00 00 DB 0B 01 03 02 00 00 00 01 00 00 00 E2 F0 FA 02 02 00 00 00 01 00 00 00 D0 F0 FA 02 03 00 00 00 00 00 00 00 EE D0 CC 01 03 00 00 00 00 00 00 00 10 0B 01 03 03 00 00 00 00 00 00 00 DB 0B 01 03 03 00 00 00 00 00 00 00 E2 F0 FA 02 03 00 00 00 00 00 00 00 D0 F0 FA 02 03 00 00 00 01 00 00 00 EE D0 CC 01 03 00 00 00 01 00 00 00 10 0B 01 03 03 00 00 00 01 00 00 00 DB 0B 01 03 03 00 00 00 01 00 00 00 E2 F0 FA 02 03 00 00 00 01 00 00 00 D0 F0 FA 02 04 00 00 00 00 00 00 00 EE D0 CC 01 04 00 00 00 00 00 00 00 10 0B 01 03 04 00 00 00 00 00 00 00 DB 0B 01 03 04 00 00 00 00 00 00 00 E2 F0 FA 02 04 00 00 00 00 00 00 00 D0 F0 FA 02 04 00 00 00 01 00 00 00 EE D0 CC 01 04 00 00 00 01 00 00 00 10 0B 01 03 04 00 00 00 01 00 00 00 DB 0B 01 03 04 00 00 00 01 00 00 00 E2 F0 FA 02 04 00 00 00 01 00 00 00 D0 F0 FA 02 05 00 00 00 00 00 00 00 EE D0 CC 01 05 00 00 00 00 00 00 00 10 0B 01 03 05 00 00 00 00 00 00 00 DB 0B 01 03 05 00 00 00 00 00 00 00 E2 F0 FA 02 05 00 00 00 00 00 00 00 D0 F0 FA 02 05 00 00 00 01 00 00 00 EE D0 CC 01 05 00 00 00 01 00 00 00 10 0B 01 03 05 00 00 00 01 00 00 00 DB 0B 01 03 05 00 00 00 01 00 00 00 E2 F0 FA 02 05 00 00 00 01 00 00 00 D0 F0 FA 02 06 00 00 00 00 00 00 00 EE D0 CC 01 06 00 00 00 00 00 00 00 10 0B 01 03 06 00 00 00 00 00 00 00 DB 0B 01 03 06 00 00 00 00 00 00 00 E2 F0 FA 02 06 00 00 00 00 00 00 00 D0 F0 FA 02 06 00 00 00 01 00 00 00 EE D0 CC 01 06 00 00 00 01 00 00 00 10 0B 01 03 06 00 00 00 01 00 00 00 DB 0B 01 03 06 00 00 00 01 00 00 00 E2 F0 FA 02 06 00 00 00 01 00 00 00 D0 F0 FA 02 07 00 00 00 00 00 00 00 EE D0 CC 01 07 00 00 00 00 00 00 00 10 0B 01 03 07 00 00 00 00 00 00 00 DB 0B 01 03 07 00 00 00 00 00 00 00 E2 F0 FA 02 07 00 00 00 00 00 00 00 D0 F0 FA 02 07 00 00 00 01 00 00 00 EE D0 CC 01 07 00 00 00 01 00 00 00 10 0B 01 03 07 00 00 00 01 00 00 00 DB 0B 01 03 07 00 00 00 01 00 00 00 E2 F0 FA 02 07 00 00 00 01 00 00 00 D0 F0 FA 02 08 00 00 00 00 00 00 00 EE D0 CC 01 08 00 00 00 00 00 00 00 10 0B 01 03 08 00 00 00 00 00 00 00 DB 0B 01 03 08 00 00 00 00 00 00 00 E2 F0 FA 02 08 00 00 00 00 00 00 00 D0 F0 FA 02 08 00 00 00 01 00 00 00 EE D0 CC 01 08 00 00 00 01 00 00 00 10 0B 01 03 08 00 00 00 01 00 00 00 DB 0B 01 03 08 00 00 00 01 00 00 00 E2 F0 FA 02 08 00 00 00 01 00 00 00 D0 F0 FA 02 00 00 02 00 70 3D 4D 00 57 A5 9B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 64 00 00 00 00 00 00 00 0B 00 00 00 82 DD 32 01 82 DD 32 01 0E 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 56 C5 53 00 AB A5 9B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 64 00 00 00 00 00 00 00 0B 00 00 00 89 DD 32 01 89 DD 32 01 0E 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01"));
        }
        System.out.println("warpCS2");
        return mplew.getPacket();
    }

    //现金装备
    public static void toCashItem(MaplePacketLittleEndianWriter mplew, int sn, int type1, int type2) {
        // E1 9C 98 00 00 06 00 00 00 - Globe Cap
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeInt(sn);
        mplew.write(0);
        mplew.write(type1);
        mplew.writeShort(0);
        mplew.write(type2);
    }

    public static void toCashItem(MaplePacketLittleEndianWriter mplew, int sn, int type0, int type1, int type2) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeInt(sn);
        mplew.write(type0);
        mplew.write(type1);
        mplew.writeShort(0);
        mplew.write(type2);
    }

    //商城更新点券和抵用券
    public static MaplePacket showNXMapleTokens(MapleCharacter chr) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CS_UPDATE.getValue());
         System.out.println("商城更新点券和抵用券"+SendPacketOpcode.CS_OPERATION);
        mplew.writeInt(chr.getCSPoints(0)); // 点券
        mplew.writeInt(chr.getCSPoints(1)); // 抵用券

        return mplew.getPacket();
    }

    public static MaplePacket enableCSorMTS() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.write(HexTool.getByteArrayFromHexString("16 00 01 00 00 00 00"));
        return mplew.getPacket();
    }

    //商城送礼
    public static MaplePacket getGiftFinish(String name, int itemid, short amount) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
        mplew.write(0x5D);//093
        System.out.println("商城送礼"+SendPacketOpcode.CS_OPERATION);
        mplew.writeMapleAsciiString(name);
        mplew.writeInt(itemid);
        mplew.writeShort(amount);

        return mplew.getPacket();
    }

    //购买商城物品
    public static MaplePacket showBoughtCSItem(MapleClient c, MapleCSInventoryItem item) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
        mplew.write(0x56);//093
         System.out.println("购买商城物品"+SendPacketOpcode.CS_OPERATION);
        mplew.writeInt(item.getUniqueId());
        mplew.writeInt(0);
        mplew.writeInt(c.getAccID());
        mplew.writeInt(0);
        mplew.writeInt(item.getItemId());//物品ID
        mplew.writeInt(item.getSn());
        mplew.writeShort(item.getQuantity());
        mplew.writeMapleNameString(item.getSender());
        mplew.writeLong(item.getExpire() == null ? DateUtil.getFileTimestamp(FINAL_TIME) : DateUtil.getFileTimestamp(item.getExpire().getTime()));
        mplew.writeLong(0);
        mplew.writeLong(0); //093新增
        mplew.writeShort(0);//093新增
        return mplew.getPacket();
    }

    //购买任务物品
    public static MaplePacket showBoughtCSQuestItem(short position, int itemid) {
        // 3F 01 6F 01 00 00 00 01 00 09 00 D7 82 3D 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
         System.out.println("购买任务物品"+SendPacketOpcode.CS_OPERATION);
        mplew.write(0x90);
        mplew.writeInt(1);
        mplew.writeShort(1);
        mplew.writeShort(position);
        mplew.writeInt(itemid);

        return mplew.getPacket();
    }

    //抵用券购买的物品
    public static MaplePacket showCouponRedeemedItem(int itemid) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
        mplew.writeShort(0x3C);//??
        System.out.println("抵用券购买的物品"+SendPacketOpcode.CS_OPERATION);
        mplew.writeInt(0);
        mplew.writeInt(1);
        mplew.writeShort(1);
        mplew.writeShort(0x1A);
        mplew.writeInt(itemid);//物品ID
        mplew.writeInt(0);

        return mplew.getPacket();
    }

    public static MaplePacket showCheckName() { //显示 检查角色名
        //23 01 3E A7 C0 62 00 00 00 00 00 01 FA 3C 00 00 00 00 00 CA 4A 0F 00 2B 2D 31 01 01 00 00 00 60 4B 40 00 F4 AC 77 00 00 00 00 00 CD 77 3C AB 25 CA 01 00 00 00 00 00 00 00 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
            System.out.println("显示 检查角色名"+SendPacketOpcode.CS_OPERATION);
        mplew.write(0x5E);//093
        mplew.write(0x07);//093
        return mplew.getPacket();
    }

    public static MaplePacket showCannotToMe() { //显示 不能向自己的帐号赠送
        //23 01 3E A7 C0 62 00 00 00 00 00 01 FA 3C 00 00 00 00 00 CA 4A 0F 00 2B 2D 31 01 01 00 00 00 60 4B 40 00 F4 AC 77 00 00 00 00 00 CD 77 3C AB 25 CA 01 00 00 00 00 00 00 00 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
        mplew.write(0x5E);//093
        mplew.write(0x06);//093
        return mplew.getPacket();
    }

    //发到道具到购物车 089ok
    public static MaplePacket sendWishList(int characterid) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //7E 01 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        //9C 01 49 01 00 FE 9A 6F 01 00 00 00 00 DC F5 19 00 00 00 00 00 A7 A6 4F 00 03 CF 7B 05 01 00 C3 B0 CF D5 B5 BA D4 CB D3 AA D4 B1 00 00 80 05 BB 46 E6 17 02 00 00
        //00 00 00 00 00 00 04 00 06 00 00 00 00 00
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
        mplew.write(0x54);//093
          System.out.println("发到道具到购物车"+SendPacketOpcode.CS_OPERATION);
        Connection con = DatabaseConnection.getConnection();
        int i = 10;
        try {
            PreparedStatement ps = con.prepareStatement("SELECT sn FROM wishlist WHERE charid = ? LIMIT 10");
            ps.setInt(1, characterid);
            ResultSet rs = ps.executeQuery();
            while (rs.next()) {
                mplew.writeInt(rs.getInt("sn"));
                i--;
            }
            rs.close();
            ps.close();
        } catch (SQLException se) {
            log.info("Error getting wishlist data:", se);
        }

        while (i > 0) {
            mplew.writeInt(0);
            i--;

        }
        return mplew.getPacket();
    }

    //更新购物车（删或增关注物品）089ok
    public static MaplePacket updateWishList(int characterid) {
        //9C 01 4D 46 9F 98 00 58 9F 98 00 57 9F 98 00 59 9F 98 00 20 4A CB 01 40 9F 98 00 CF 1F 9A 00 00 00 00 00 00 00 00 00 00 00 00 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
         System.out.println("更新购物车（删或增关注物品）"+SendPacketOpcode.CS_OPERATION);
        mplew.write(0x88);//093
        Connection con = DatabaseConnection.getConnection();
        int i = 10;
        try {
            PreparedStatement ps = con.prepareStatement("SELECT sn FROM wishlist WHERE charid = ? LIMIT 10");
            ps.setInt(1, characterid);
            ResultSet rs = ps.executeQuery();
            while (rs.next()) {
                mplew.writeInt(rs.getInt("sn"));
                i--;
            }
            rs.close();
            ps.close();
        } catch (SQLException se) {
            log.info("Error getting wishlist data:", se);
        }

        while (i > 0) {
            mplew.writeInt(0);
            i--;
        }
        return mplew.getPacket();
    }

    //错误的兑换码
    public static MaplePacket wrongCouponCode() {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
        mplew.write(0x58);
        mplew.write(0x28);

        return mplew.getPacket();
    }

    public static MaplePacket getFindReplyWithCS(String target) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.WHISPER.getValue());
        mplew.write(9);
        mplew.writeMapleAsciiString(target);
        mplew.write(2);
        mplew.writeInt(-1);

        return mplew.getPacket();
    }

    //更新宠物ok
    public static MaplePacket updatePet(MaplePet pet, boolean alive) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*
95
22 00
00 02 03 05
02
00 00
05
02
00
03
5D 4B 4C 00
01
D9 87 47 00
00 00 00 00
00 80 05 BB 46 E6 17 02
FF FF FF FF
BD F8 BB AF
C1 FA 00 00
00 00 00 00 00
07
4E 00
5F
00 B0 10 20 F8 58 CC 01
00 00 37 00 00 00 00 00 00 00 01
00 00 00 00
         */
        //System.out.println("宠物更新");
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(0);
        mplew.write(2);
        mplew.write(3);
        mplew.write(5);
        mplew.write(pet.getPosition());
        mplew.writeShort(0);
        mplew.write(5);
        mplew.write(pet.getPosition());
        mplew.write(0);
        mplew.write(3);
        mplew.writeInt(pet.getItemId());//宠物ID
        mplew.write(1);
        mplew.writeInt(pet.getUniqueId());
        mplew.writeInt(0);
        mplew.write(HexTool.getByteArrayFromHexString("00 80 05 BB 46 E6 17 02"));
        mplew.writeInt(-1);//093新增
        /*
        String petname = pet.getName();
        if (petname.getBytes().length > 13) {
            petname = petname.substring(0, 13);
        }
        mplew.writeAsciiString(petname);//宠物名
        for (int i = petname.getBytes().length; i < 13; i++) {
            mplew.write(0);
        }
        */
        mplew.writeMapleNameString(pet.getName()); //自动填充到13位
        mplew.write(pet.getLevel());//宠物等级
        mplew.writeShort(pet.getCloseness());//亲密度
        mplew.write(pet.getFullness());//饱满度
        mplew.writeLong(DateUtil.getFileTimestamp((long) (System.currentTimeMillis() * 1.5), false));
        mplew.write(HexTool.getByteArrayFromHexString("00 00 37 00 00 00 00 00 00 00"));
        if (alive) { //放出宠物
            mplew.write(1);
        } else { //收起宠物
            mplew.write(0);
        }
        mplew.writeInt(0);

        return mplew.getPacket();
    }

    public static MaplePacket showPet(MapleCharacter chr, MaplePet pet, boolean remove) {
        return showPet(chr, pet, remove, false);
    }

    //显示宠物ok
    public static MaplePacket showPet(MapleCharacter chr, MaplePet pet, boolean remove, boolean hunger) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*
         * DB 00
         * 47 D1 08 00
         * 00
         * 00 00 00 01
         * 00
         * 5D 4B 4C 00
         * 06 00 BD F8 BB AF C1 FA
         * D9 87 47 00
         * 00 00 00 00
         * 31 00
         * A1 04
         * 00 12
         * 00
         */
        mplew.writeShort(SendPacketOpcode.SPAWN_PET.getValue());
        mplew.writeInt(chr.getId());
        mplew.write(chr.getPetSlot(pet));
        if (remove) {
            //System.out.println("取消宠物");
            mplew.writeInt(0);
            mplew.write(hunger ? 1 : 0);
        } else {
            //System.out.println("召唤宠物");
            mplew.writeInt(0x1000000); //093修改 原来都是发byte 简化一下
            mplew.write(0);
            mplew.writeInt(pet.getItemId());//宠物ID
            mplew.writeMapleAsciiString(pet.getName());//宠物名
            mplew.writeInt(pet.getUniqueId());
            mplew.writeInt(0);
            mplew.writeShort(pet.getPos().x);//X
            mplew.writeShort(pet.getPos().y);//Y
            mplew.write(pet.getStance());//姿势
            mplew.writeShort(pet.getFh());
        }

        return mplew.getPacket();
    }

    //宠物移动
    public static MaplePacket movePet(int cid, Point startPos, int slot, List<LifeMovementFragment> moves) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*
         * DE 00
         * 9F 2F 75 00
         * 00 00 00 00
         * BC 00 EB 05
         * D6 8B A8 00
         * 02
         * 00 BC 00 EB 05 00 00 00 00 34 00 00 00 00 00 16 F0 00
         * 00 BC 00 EB 05 00 00 00 00 34 00 00 00 00 00 04 0E 01
         */
        mplew.writeShort(SendPacketOpcode.MOVE_PET.getValue());
        //System.out.println("宠物移动啦");
        mplew.writeInt(cid);
        mplew.writeInt(slot);
        //mplew.writeInt(pid);
        mplew.writePos(startPos);
        serializeMovementList(mplew, moves);
        return mplew.getPacket();
    }

    //宠物说话
    public static MaplePacket petChat(int cid, int slot, int act, String text) {

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //CC 00 [14 0D 04 00] [00] [00 00] [00 01] 01
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PET_CHAT.getValue());
         System.out.println("宠物说话啦");
        mplew.writeInt(cid);
        mplew.write(slot);
        mplew.writeShort(act);
        mplew.writeMapleAsciiString(text);
        mplew.write(0);

        return mplew.getPacket();
    }

    //宠物指令
    public static MaplePacket commandResponse(int cid, int slot, int animation, boolean success) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PET_COMMAND.getValue());
        mplew.writeInt(cid);
        System.out.println("使用宠物指令");
        mplew.write(slot);
        mplew.write((animation == 1 && success) ? 1 : 0);
        mplew.write(animation);
        if (animation == 1) {
            mplew.write(0);
        } else {
            mplew.writeShort(success ? 1 : 0);
        }
        return mplew.getPacket();
    }

    public static MaplePacket showOwnPetLevelUp(int index) {

        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(4);
        mplew.write(0);
        mplew.write(index); // Pet Index

        return mplew.getPacket();
    }

    public static MaplePacket showPetLevelUp(MapleCharacter chr, int index) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.SHOW_FOREIGN_EFFECT.getValue());
        mplew.writeInt(chr.getId());
        mplew.write(4);
        mplew.write(0);
        mplew.write(index);

        return mplew.getPacket();
    }

    public static MaplePacket changePetName(MapleCharacter chr, String newname, int slot) {
        // 82 00 E6 DC 17 00 00 04 00 4A 65 66 66 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.PET_NAMECHANGE.getValue());
        System.out.println("宠物改名"+SendPacketOpcode.PET_NAMECHANGE.getValue());
        mplew.writeInt(chr.getId());
        mplew.write(0);
        mplew.writeMapleAsciiString(newname);
        mplew.write(0);

        return mplew.getPacket();
    }

    public static MaplePacket showCharCash(MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CHAR_CASH.getValue());
        mplew.writeInt(chr.getId());
        mplew.writeInt(chr.getCSPoints(1));

        return mplew.getPacket();
    }

    public static MaplePacket weirdStatUpdate() {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.UPDATE_STATS.getValue());
        mplew.write(0);
        mplew.write(0x38);
        mplew.writeShort(0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.write(0);
        mplew.write(1);

        return mplew.getPacket();
    }

    //地图装备效果
    public static MaplePacket showForcedEquip() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.FORCED_MAP_EQUIP.getValue());
        System.out.println("地图装备效果");
        mplew.writeInt(0);
        return mplew.getPacket();
    }

     public static MaplePacket showMapEFFECTXG(String path) {
         if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MAP_EFFECTXG.getValue());
        System.out.println("地图效果");
        mplew.write(3);
        mplew.writeMapleAsciiString(path);
        return mplew.getPacket();
    }


     //召唤兽技能
    public static MaplePacket summonSkill(int cid, int summonSkillId, int newStance) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SUMMON_SKILL.getValue());
        mplew.writeInt(cid);
        mplew.writeInt(summonSkillId);
        mplew.write(newStance);

        return mplew.getPacket();
    }

    public static MaplePacket skillCooldown(int sid, int time) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.COOLDOWN.getValue());
        mplew.writeInt(sid);
        mplew.writeInt(time);
        return mplew.getPacket();
    }

    //使用技能书
    public static MaplePacket skillBookSuccess(MapleCharacter chr, int skillid, int maxlevel, boolean canuse, boolean success) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
       //36 00 [01 B8 DB 07] [00] 01 [6B 9F 2F 00] [14 00 00 00] 00 00
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.USE_SKILL_BOOK.getValue());
        mplew.write(0);
        mplew.writeInt(chr.getId()); // character id
        mplew.write(1);
        mplew.writeInt(skillid);//技能书ID
        mplew.writeInt(maxlevel);//最大等级
        mplew.write(canuse ? 1 : 0);
        mplew.write(success ? 1 : 0);

        return mplew.getPacket();
    }

    //技能宏
    public static MaplePacket getMacros(SkillMacro[] macros) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.SKILL_MACRO.getValue());
        int count = 0;
        for (int i = 0; i < 5; i++) {
            if (macros[i] != null) {
                count++;
            }
        }
        mplew.write(count); //size
        for (int i = 0; i < 5; i++) {
            SkillMacro macro = macros[i];
            if (macro != null) {
                mplew.writeMapleAsciiString(macro.getName());
                mplew.write(macro.getShout()); //用宏技能时说的话
                mplew.writeInt(macro.getSkill1());
                mplew.writeInt(macro.getSkill2());
                mplew.writeInt(macro.getSkill3());
            }
        }

        return mplew.getPacket();
    }

    //玩家NPC
    public static MaplePacket getPlayerNPC(int id) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_NPC.getValue());
        Connection con = DatabaseConnection.getConnection();
        try {
            PreparedStatement ps = con.prepareStatement("SELECT * FROM playernpcs WHERE id = ?");
            ps.setInt(1, id);
            ResultSet rs = ps.executeQuery();
            while (rs.next()) {
                mplew.write(rs.getByte("dir"));
                mplew.writeInt(id);
                mplew.writeMapleAsciiString(rs.getString("name"));
                mplew.write(0);
                mplew.write(rs.getByte("skin"));
                mplew.writeInt(rs.getInt("face"));
                mplew.write(0);
                mplew.writeInt(rs.getInt("hair"));
            }
            rs.close();
            ps.close();
        } catch (Exception e) {
        }
        try {
            PreparedStatement ps = con.prepareStatement("SELECT * FROM playernpcs_equip WHERE npcid = ? AND type = 0");
            ps.setInt(1, id);
            ResultSet rs = ps.executeQuery();
            while (rs.next()) {
                mplew.write(rs.getByte("equippos"));
                mplew.writeInt(rs.getInt("equipid"));
            }
            rs.close();
            ps.close();
        } catch (Exception e) {
        }
        mplew.writeShort(-1);
        int count = 0;
        try {
            PreparedStatement ps = con.prepareStatement("SELECT * FROM playernpcs_equip WHERE npcid = ? AND type = 1");
            ps.setInt(1, id);
            ResultSet rs = ps.executeQuery();
            while (rs.next()) {
                mplew.writeInt(rs.getInt("equipid"));
                count += 1;
            }
            rs.close();
            ps.close();
        } catch (Exception e) {
        }
        while (count < 4) {
            mplew.writeInt(0);
            count += 1;
        }
        return mplew.getPacket();
    }

    //小纸条
    public static MaplePacket showNotes(ResultSet notes, int count) throws SQLException {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.SHOW_NOTES.getValue());
        mplew.write(3);
        mplew.write(count);
        for (int i = 0; i < count; i++) {
            mplew.writeInt(notes.getInt("id"));
            mplew.writeMapleAsciiString(notes.getString("from"));
            mplew.writeMapleAsciiString(notes.getString("message"));
            mplew.writeLong(DateUtil.getFileTimestamp(notes.getLong("timestamp")));
            mplew.write(1);
            notes.next();
        }

        return mplew.getPacket();
    }

    public static void sendUnkwnNote(String to, String msg, String from) throws SQLException {
        Connection con = DatabaseConnection.getConnection();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        PreparedStatement ps = con.prepareStatement("INSERT INTO notes (`to`, `from`, `message`, `timestamp`) VALUES (?, ?, ?, ?)");
        ps.setString(1, to);
        ps.setString(2, from);
        ps.setString(3, msg);
        ps.setLong(4, System.currentTimeMillis());
        ps.executeUpdate();
        ps.close();
    }

    public static MaplePacket updateAriantPQRanking(String name, int score, boolean empty) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.ARIANT_PQ_START.getValue());
        //E9 00 pid
        //01 unknown
        //09 00 53 69 6E 50 61 74 6A 65 68 maple ascii string name
        //00 00 00 00 score
        mplew.write(empty ? 0 : 1);
        if (!empty) {
            mplew.writeMapleAsciiString(name);
            mplew.writeInt(score);
        }

        return mplew.getPacket();
    }

    //抓怪物
    public static MaplePacket catchMonster(int mobid, int itemid, byte success) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.CATCH_MONSTER.getValue());
        //BF 00
        //38 37 2B 00 mob id
        //32 A3 22 00 item id
        //00 success??
        mplew.writeInt(mobid);
        mplew.writeInt(itemid);
        mplew.write(success);

        return mplew.getPacket();
    }

    //显示所有的角色
    public static MaplePacket showAllCharacter(int chars, int unk) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.ALL_CHARLIST.getValue());
        mplew.write(1);
        mplew.writeInt(chars);
        mplew.writeInt(unk);
        return mplew.getPacket();
    }

    //显示所有的角色信息
    public static MaplePacket showAllCharacterInfo(int worldid, List<MapleCharacter> chars) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.ALL_CHARLIST.getValue());
        mplew.write(0);
        mplew.write(worldid);
        mplew.write(chars.size());
        for (MapleCharacter chr : chars) {
            addCharEntry(mplew, chr);
        }
        return mplew.getPacket();
    }

    //用户说话黑板
    public static MaplePacket useChalkboard(MapleCharacter chr, boolean close) {

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CHALKBOARD.getValue());
        mplew.writeInt(chr.getId());
        if (close) {
            mplew.write(0);
        } else {
            mplew.write(1);
            mplew.writeMapleAsciiString(chr.getChalkboard());
        }

        return mplew.getPacket();
    }

    public static MaplePacket removeItemFromDuey(boolean remove, int Package) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.DUEY.getValue());
        mplew.write(0x17);
        mplew.writeInt(Package);
        mplew.write(remove ? 3 : 4);
        return mplew.getPacket();
    }

    public static MaplePacket sendDueyMessage(byte operation) {
        return sendDuey(operation, null);
    }

    //送货员
    public static MaplePacket sendDuey(byte operation, List<MapleDueyActions> packages) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.DUEY.getValue());
        mplew.write(10);
        if (operation == 9) {
            mplew.write(0);
            mplew.write(packages.size());
            for (MapleDueyActions dp : packages) {
                mplew.writeInt(dp.getPackageId());
                /*
                mplew.writeAsciiString(dp.getSender());
                for (int i = dp.getSender().getBytes().length; i < 13; i++) {
                    mplew.write(0);
                }
                */
                mplew.writeMapleNameString(dp.getSender()); //自动填充到13位

                mplew.writeInt(dp.getMesos());
                mplew.writeLong(DateUtil.getFileTimestamp(dp.sentTimeInMilliseconds()));
                mplew.writeLong(0);
                for (int i = 0; i < 48; i++) { //message is supposed to be here...
                    mplew.writeInt(new Random().nextInt(Integer.MAX_VALUE));
                }
                mplew.writeInt(0);
                mplew.write(0);
                if (dp.getItem() != null) {
                    mplew.write(1);
                    addItemInfo(mplew, dp.getItem(), true, true, false);
                } else {
                    mplew.write(0);
                }
            }
            mplew.write(0);
        }
        return mplew.getPacket();
    }

    public static MaplePacket sendMTS(List<MTSItemInfo> items, int tab, int type, int page, int pages) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MTS_OPERATION.getValue());
        mplew.write(0x14); //operation
        mplew.writeInt(pages * 10);
        mplew.writeInt(items.size()); //number of items
        mplew.writeInt(tab);
        mplew.writeInt(type);
        mplew.writeInt(page);
        mplew.write(1);
        mplew.write(1);
        for (int i = 0; i < items.size(); i++) {
            MTSItemInfo item = items.get(i);
            addItemInfo(mplew, item.getItem(), true, true, false);
            mplew.writeInt(item.getID()); //id
            mplew.writeInt(item.getTaxes()); //this + below = price
            mplew.writeInt(item.getPrice()); //price
            mplew.writeInt(0);
            mplew.writeLong(DateUtil.getFileTimestamp(item.getEndingDate()));
            mplew.writeMapleAsciiString(item.getSeller()); //account name (what was nexon thinking?)
            mplew.writeMapleAsciiString(item.getSeller()); //char name
            for (int ii = 0; ii < 28; ii++) {
                mplew.write(0);
            }
        }
        mplew.write(1);

        return mplew.getPacket();
    }

    public static MaplePacket showMTSCash(MapleCharacter p) {
        //16 01 00 00 00 00 00 00 00 00
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MTS_OPERATION2.getValue());
        mplew.writeInt(p.getCSPoints(1));
        return mplew.getPacket();
    }

    public static MaplePacket MTSWantedListingOver(int nx, int items) {
        //Listing period on [WANTED] items
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //(just a message stating you have gotten your NX/items back, only displays if nx or items != 0)
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MTS_OPERATION.getValue());
        mplew.write(0x3A);
        mplew.writeInt(nx);
        mplew.writeInt(items);
        mplew.writeLong(0);
        return mplew.getPacket();
    }

    public static MaplePacket MTSConfirmSell() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MTS_OPERATION.getValue());
        mplew.write(0x1D);
        return mplew.getPacket();
    }

    public static MaplePacket MTSConfirmBuy() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MTS_OPERATION.getValue());
        mplew.write(0x33);
        return mplew.getPacket();
    }

    public static MaplePacket MTSFailBuy() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MTS_OPERATION.getValue());
        mplew.write(0x34);
        mplew.write(0x42);
        return mplew.getPacket();
    }

    public static MaplePacket MTSConfirmTransfer(int quantity, int pos) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MTS_OPERATION.getValue());
        mplew.write(0x27);
        mplew.writeInt(quantity);
        mplew.writeInt(pos);
        return mplew.getPacket();
    }

    public static MaplePacket NotYetSoldInv(List<MTSItemInfo> items) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MTS_OPERATION.getValue());
        mplew.write(32);
        mplew.writeInt(items.size());
        if (!items.isEmpty()) {
            for (MTSItemInfo item : items) {
                addItemInfo(mplew, item.getItem(), true, true, false);
                mplew.writeInt(item.getID()); //id
                mplew.writeInt(item.getTaxes()); //this + below = price
                mplew.writeInt(item.getPrice()); //price
                mplew.writeInt(0);
                mplew.writeLong(DateUtil.getFileTimestamp(item.getEndingDate()));
                mplew.writeMapleAsciiString(item.getSeller()); //account name (what was nexon thinking?)
                mplew.writeMapleAsciiString(item.getSeller()); //char name
                for (int ii = 0; ii < 28; ii++) {
                    mplew.write(0);
                }
            }
        } else {
            mplew.writeInt(0);
        }

        return mplew.getPacket();
    }

    public static MaplePacket TransferInventory(List<MTSItemInfo> items) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.MTS_OPERATION.getValue());
        mplew.write(30);
        mplew.writeInt(items.size());
        if (!items.isEmpty()) {
            for (MTSItemInfo item : items) {
                addItemInfo(mplew, item.getItem(), true, true, false);
                mplew.writeInt(item.getID()); //id
                mplew.writeInt(item.getTaxes()); //taxes
                mplew.writeInt(item.getPrice()); //price
                mplew.writeInt(0);
                mplew.writeLong(DateUtil.getFileTimestamp(item.getEndingDate()));
                mplew.writeMapleAsciiString(item.getSeller()); //account name (what was nexon thinking?)
                mplew.writeMapleAsciiString(item.getSeller()); //char name
                for (int i = 0; i < 28; i++) {
                    mplew.write(0);
                }
            }
        }
        mplew.write(0xD0 + items.size());
        mplew.write(HexTool.getByteArrayFromHexString("FF FF FF 00"));

        return mplew.getPacket();
    }

    public static MaplePacket showZakumShrineTimeLeft(int timeleft) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.ZAKUM_SHRINE.getValue());
        mplew.write(0);
        mplew.writeInt(timeleft);

        return mplew.getPacket();
    }

    //船效果
    public static MaplePacket boatPacket(int effect) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.BOAT_EFFECT.getValue());
        mplew.writeShort(effect); //1034: balrog boat comes, 1548: boat comes in ellinia station, 520: boat leaves ellinia station
        return mplew.getPacket();
    }

    //开始怪物嘉年华
    public static MaplePacket startMonsterCarnival(int team) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.MONSTER_CARNIVAL_START.getValue());
        mplew.write(team);
        mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"));
        return mplew.getPacket();
    }

    //玩家死亡信息
    public static MaplePacket playerDiedMessage(String name, int lostCP, int team) { //CPQ
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.MONSTER_CARNIVAL_DIED.getValue());
        mplew.write(team); //team
        mplew.writeMapleAsciiString(name);
        mplew.write(lostCP);
        return mplew.getPacket();
    }

    public static MaplePacket CPUpdate(boolean party, int curCP, int totalCP, int team) { //CPQ
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        if (!party) {
            mplew.writeShort(SendPacketOpcode.MONSTER_CARNIVAL_OBTAINED_CP.getValue());
        } else {
            mplew.writeShort(SendPacketOpcode.MONSTER_CARNIVAL_PARTY_CP.getValue());
            mplew.write(team); //team?
        }
        mplew.writeShort(curCP);
        mplew.writeShort(totalCP);
        return mplew.getPacket();
    }

    //玩家传送
    public static MaplePacket playerSummoned(String name, int tab, int number) {
        //E5 00
        //02 tabnumber
        //04 number
        //09 00 57 61 72 50 61 74 6A 65 68 name
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MONSTER_CARNIVAL_SUMMON.getValue());
        mplew.write(tab);
        mplew.write(number);
        mplew.writeMapleAsciiString(name);
        return mplew.getPacket();
    }

    //缩地石
    public static MaplePacket TrockRefreshMapList(MapleCharacter chr, byte vip) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.TROCK_LOCATIONS.getValue());
        mplew.write(3);
        mplew.write(vip);
        List<Integer> maps = chr.getTRockMaps(vip);
        for (int map : maps) {
            mplew.writeInt(map);
        }
        for (int i = maps.size(); i <= 10; i++) {
            mplew.write(CHAR_INFO_MAGIC);
        }
        maps.clear();

        return mplew.getPacket();
    }

    //能量获得
    public static MaplePacket giveEnergyCharge(int barammount) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
        mplew.writeInt(0);
        mplew.writeLong(MapleBuffStat.能量获得.getValue());
        mplew.writeShort(0);
        mplew.writeInt(0);
        mplew.writeShort(barammount);
        mplew.writeShort(0);
        mplew.writeLong(0);
        mplew.write(0);
        mplew.writeInt(50);
        return mplew.getPacket();
    }

    public static MaplePacket giveForeignEnergyCharge(int cid, int barammount) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
        mplew.writeInt(cid);
        mplew.writeLong(0);
        mplew.writeLong(MapleBuffStat.能量获得.getValue());
        mplew.writeShort(0);
        mplew.writeShort(barammount);
        mplew.writeShort(0);
        mplew.writeLong(0);
        mplew.writeShort(0);
        mplew.writeShort(0);
        return mplew.getPacket();
    }

    //配偶聊天
    public static MaplePacket spouseChat(String from, String message, int type) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.SPOUSE_CHAT.getValue());
        mplew.write(type);
        if (type == 4) {
            mplew.write(1);
        } else {
            mplew.writeMapleAsciiString(from);
            mplew.write(5);
        }
        mplew.writeMapleAsciiString(message);
        return mplew.getPacket();
    }

    /**
     * Adds a announcement box to an existing MaplePacketLittleEndianWriter.
     *
     * @param mplew The MaplePacketLittleEndianWriter to add an announcement box to.
     * @param shop The shop to announce.
     */
    private static void addAnnounceBox(MaplePacketLittleEndianWriter mplew, IPlayerInteractionManager interaction) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.write(4);
        //mplew.write(0);
        //mplew.write(1);
        //mplew.write(1);
        if (interaction.getShopType() == 2) {
            mplew.writeInt(((MaplePlayerShop) interaction).getObjectId());
        }
        mplew.writeMapleAsciiString(interaction.getDescription()); // 递减
        //mplew.write(HexTool.getByteArrayFromHexString("8E 80"));
        mplew.write(0);
        mplew.write(interaction.getItemType());
        mplew.write(1);
        mplew.write(interaction.getFreeSlot() > -1 ? 4 : 1);

        if (interaction.getShopType() == 2) {
            mplew.write(0);
        }
    }

    //发送玩家交互
    public static MaplePacket sendInteractionBox(MapleCharacter c) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //BA 00 [46 08 01 00] [00 01 01] [45 4B 4C 00] [08 00 B0 D7 C9 AB CD C3 D7 D3] [8E 80] [01] 00 00 00 00 00 E1 00 22 00 04 58 00 00 00
        //BA 00 [91 C2 00 00] [00 01 01] [64 4B 4C 00] [08 00 D8 BC D1 C5 C3 EF B5 FB] [81 01] [00] 00 00 00 00 00 ED 01 04 00 04 42 00 00 00
        //BA 00 [25 81 00 00] [00 01 01] [78 4B 4C 00] [06 00 BE DE D7 EC C4 F1]       [95 3E] [00] 00 00 00 00 00 2E 02 04 00 16 3D 00 00 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.UPDATE_CHAR_BOX.getValue());
        mplew.writeInt(c.getId());
        addAnnounceBox(mplew, c.getInteraction());
        return mplew.getPacket();
    }

    //雇佣商店
    public static MaplePacket hiredMerchantBox(MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SPAWN_HIRED.getValue());
        mplew.write(0x07);
        return mplew.getPacket();
    }

    public static MaplePacket getInteraction(MapleCharacter chr, boolean firstTime) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue()); // header.

        IPlayerInteractionManager ips = chr.getInteraction();
        int type = ips.getShopType();
        if (type == 1) {
            mplew.write(HexTool.getByteArrayFromHexString("05 05 04"));
        } else if (type == 2) {
            mplew.write(HexTool.getByteArrayFromHexString("05 04 04"));
        } else if (type == 3) {
            mplew.write(HexTool.getByteArrayFromHexString("05 02 02"));
        } else if (type == 4) {
            mplew.write(HexTool.getByteArrayFromHexString("05 01 02"));
        }

        mplew.write(ips.isOwner(chr) ? 0 : 1);
        mplew.write(0);
        if (type == 2 || type == 3 || type == 4) {
            addCharLook(mplew, ((MaplePlayerShop) ips).getMCOwner(), false);
            mplew.writeMapleAsciiString(ips.getOwnerName());
        } else {
            mplew.writeInt(((HiredMerchant) ips).getItemId());
            mplew.writeMapleAsciiString("雇佣商人");
        }
        for (int i = 0; i < 3; i++) {
            if (ips.getVisitors()[i] != null) {
                mplew.write(i + 1);
                addCharLook(mplew, ips.getVisitors()[i], false);
                mplew.writeMapleAsciiString(ips.getVisitors()[i].getName());
            }
        }
        mplew.write(0xFF);
        if (type == 1) {
            mplew.writeShort(0);
            mplew.writeMapleAsciiString(ips.getOwnerName());
            if (ips.isOwner(chr)) {
                mplew.writeInt(Integer.MAX_VALUE); // contains timing, suck my dick we dont need this
                mplew.write(firstTime ? 1 : 0);
                mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00"));
            }
        }
        mplew.writeMapleAsciiString(ips.getDescription());
        if (type == 3) {
            mplew.write(ips.getItemType());
            mplew.write(0);
        } else {
            mplew.write(0x10);
            if (type == 1) {
                mplew.writeInt(0);
            }
            mplew.write(ips.getItems().size());
            if (ips.getItems().isEmpty()) {
                if (type == 1) {
                    mplew.write(0);
                } else {
                    mplew.writeInt(0);
                }
            } else {
                for (MaplePlayerShopItem item : ips.getItems()) {
                    mplew.writeShort(item.getBundles());
                    mplew.writeShort(item.getItem().getQuantity());
                    mplew.writeInt(item.getPrice());
                    addItemInfo(mplew, item.getItem(), true, true, true);
                }
            }
        }
        return mplew.getPacket();
    }

    //商店聊天
    public static MaplePacket shopChat(String message, int slot) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("06 08"));
        mplew.write(slot);
        mplew.writeMapleAsciiString(message);
        return mplew.getPacket();
    }

    public static MaplePacket shopErrorMessage(int error, int type) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0x0A);
        mplew.write(type);
        mplew.write(error);
        return mplew.getPacket();
    }

    public static MaplePacket closeshop() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0x28);
        mplew.write(0);
        return mplew.getPacket();
    }
    public static MaplePacket spawnHiredMerchant(HiredMerchant hm) {
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SPAWN_HIRED_MERCHANT.getValue());
        mplew.writeInt(hm.getOwnerId());
        mplew.writeInt(hm.getItemId());
        mplew.writeShort((short) hm.getPosition().getX());
        mplew.writeShort((short) hm.getPosition().getY());
        mplew.writeShort(0);
        mplew.writeMapleAsciiString(hm.getOwnerName());
        mplew.write(0x05);
        mplew.writeInt(hm.getObjectId());
        mplew.writeMapleAsciiString(hm.getDescription());
        mplew.write(hm.getItemId() % 10);
        mplew.write(HexTool.getByteArrayFromHexString("01 04"));
        return mplew.getPacket();
    }

    public static MaplePacket destroyHiredMerchant(int id) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.DESTROY_HIRED_MERCHANT.getValue());
        mplew.writeInt(id);
        return mplew.getPacket();
    }

    public static MaplePacket shopItemUpdate(IPlayerInteractionManager shop) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0x17);// v77 = 0x15 //v78 = 0x17
        if (shop.getShopType() == 1) {
            mplew.writeInt(0);
        }
        mplew.write(shop.getItems().size());
        for (MaplePlayerShopItem item : shop.getItems()) {
            mplew.writeShort(item.getBundles());
            mplew.writeShort(item.getItem().getQuantity());
            mplew.writeInt(item.getPrice());
            addItemInfo(mplew, item.getItem(), true, true, true);
        }
        return mplew.getPacket();
    }

    public static MaplePacket shopVisitorAdd(MapleCharacter chr, int slot) { //玩家进入SHOP
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0x04);
        mplew.write(slot);
        addCharLook(mplew, chr, false);
        mplew.writeMapleAsciiString(chr.getName());
        return mplew.getPacket();
    }

    public static MaplePacket shopVisitorLeave(int slot) { //玩家离开SHOP
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.write(0x0A);
        if (slot > 0) {
            mplew.write(slot);
        }

        return mplew.getPacket();
    }

    public static MaplePacket updateHiredMerchant(HiredMerchant shop) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.UPDATE_HIRED_MERCHANT.getValue());
        mplew.writeInt(shop.getOwnerId());
        mplew.write(0x04);
        mplew.writeInt(shop.getObjectId());
        mplew.writeMapleAsciiString(shop.getDescription());
        mplew.write(shop.getItemId() % 10);
        mplew.write(shop.getFreeSlot() > -1 ? 3 : 2);
        mplew.write(0x04);

        return mplew.getPacket();
    }

    public static MaplePacket getMiniBoxFull() { // 满了？
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
        mplew.writeShort(5);
        mplew.write(2);
        return mplew.getPacket();
    }


    //极速领域
    public static MaplePacket giveInfusion(int skillid, int bufflength, int speed) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*
25 00
00 00 00 10 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00
FE FF FF FF
F1 23 4E 00
01 01 00 00 00
01 01 00 00 00
2C 01 58 02
         */
        mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
        mplew.writeLong(MapleBuffStat.极速领域.getValue());//变形
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeLong(0);
        mplew.writeShort(0);
        mplew.write(0);
        mplew.writeInt(speed);
        mplew.writeInt(skillid);
        for(int i = 0; i < 2 ; i++) {
            mplew.write(1);
            mplew.writeInt(1);
        }
        mplew.writeShort(bufflength);//持续时间[秒] 不同于其他技能的毫秒 bufflength传入前已经/1000了
        mplew.writeShort(0);//技能范围
        return mplew.getPacket();
    }


    public static MaplePacket giveForeignInfusion(int cid, int skillid, int bufflength, int speed) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
        mplew.writeInt(cid);
        mplew.writeLong(MapleBuffStat.极速领域.getValue());//变形
        mplew.writeLong(0);
        mplew.writeInt(0);
        mplew.writeShort(0);
        mplew.writeInt(speed);
        mplew.writeInt(skillid);
        mplew.writeLong(0);
        mplew.writeShort(bufflength);//持续时间 bufflength传入前已经/1000了
        mplew.writeShort(600);//技能范围
        return mplew.getPacket();
    }

    public static MaplePacket sendMaplePolice(int reason, String reasoning, int duration) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.GM_POLICE.getValue());
        mplew.writeInt(duration);
        mplew.write(4);
        mplew.write(reason);
        mplew.writeMapleAsciiString(reasoning);
        return mplew.getPacket();
    }

    //更新装备栏
    public static MaplePacket updateEquipSlot(IItem item) {
        return updateEquipSlot(item, false);
    }

    public static MaplePacket updateEquipSlot(IItem item, boolean hourGlass) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*
22 00
         * 00 02 03
01
06 00
00
01
06 00 //由于是一个short 所以不能用additem来发包 需要先写出来
         *
01
AA EF 14 00
00
A0 45 85 AE 4A 8C CC 01
FF FF FF FF 07 00 00 00 00 00 05 00 00 00 00 00 00 00 1A 00 3A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 35 87 00 00 50 00 00 10 00 40 E0 FD 3B 37 4F 01 FF FF FF FF
         */
        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("00 02 03"));
        mplew.write(item.getType());
        mplew.writeShort(item.getPosition());
        mplew.write(0);
        mplew.write(item.getType()); //1显示 2消失？
        mplew.writeShort(item.getPosition());
        addItemInfo(mplew, item, true, true, true);
        if (hourGlass) {
            mplew.write(2);
        }
        //System.out.println("更新包："+mplew.toString());
        return mplew.getPacket();
    }

    //龙神 召唤龙
    public static MaplePacket SummonDragon(MapleCharacter chr ,int oid) {
        return spawnDragon(chr);
    }

    public static MaplePacket updateBattleShipHP(int chr, int hp) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_MONSTER_HP.getValue());
        mplew.writeInt(chr);
        mplew.write(hp);

        return mplew.getPacket();
    }

    public static MaplePacket updateMount(int charid, MapleMount mount, boolean levelup) {
        return updateMount(charid, mount.getLevel(), mount.getExp(), mount.getTiredness(), levelup);
    }

    public static MaplePacket updateMount(int charid, int newlevel, int newexp, int tiredness, boolean levelup) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.UPDATE_MOUNT.getValue());
        mplew.writeInt(charid);
        mplew.writeInt(newlevel);
        mplew.writeInt(newexp);
        mplew.writeInt(tiredness);
        mplew.write(levelup ? (byte) 1 : (byte) 0);
        return mplew.getPacket();
    }

     //将商城的道具放到背包里
    public static MaplePacket transferFromCSToInv(IItem item, int position) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //7E 01 5F 03 00 01 52 4B 0F 00 01 0F 27 C6 00 00 00 00 00 00 80 05 BB 46 E6 17 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 40 E0 FD 3B 37 4F 01 FF FF FF FF
        //9C 01 [66] [01] 00 02 F0 23 4E 00 01 C7 88 BD 00 00 00 00 00 00 80 05 BB 46 E6 17 02 01 00 00 00 00 00
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
        mplew.write(0x69);//093
        System.out.println("将商城的道具放到背包里"+SendPacketOpcode.CS_OPERATION);
        mplew.write(position);//in csinventory
        addCashItemInfo(mplew,item,true, false, true);
        return mplew.getPacket();
    }

    //将背包的道具放到商城的道具栏
    public static MaplePacket transferFromInvToCS(MapleCharacter c, MapleCSInventoryItem item) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //洗能力点卷轴
        //9C 01 [68] [3F 9F BD 00] [00 00 00 00] [DC F5 19 00] [00 00 00 00] [90 0E 4D 00] [C1 D0 CC 01] [01 00]
        //[00 00 00 00 00 00 00 00 00 00 00 00 00] [00 80 05 BB 46 E6 17 02] [1E 00 00 00 00 00 00 00]
        /*
         * DF 01
         * [6B]
         * [A6 B4 C1 00]
         * 00 00 00 00
         * 80 F6 95 02
         * 00 00 00 00
         * 2D F9 19 00
         * 2A 20 9A 00
         * 01 00
         * 00 00 00 00
         * 00 00 00 00
         * 00 00 00 00
         * 00
         * 70 14 EB 53 D9 3F CC 01
         * 00 00 00 00 00 00 00 00
         * 00 00 00 00 00 00 00 00
         * 00 00
         */
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
        mplew.write(0x6B);//093
        System.out.println("将背包的道具放到商城的道具栏"+SendPacketOpcode.CS_OPERATION);
        mplew.writeInt(item.getUniqueId());//Un编号
        mplew.writeInt(0);
        mplew.writeInt(c.getAccountID());
        mplew.writeInt(0);
        mplew.writeInt(item.getItemId());//道具ID
        mplew.writeInt(item.getSn());
        mplew.writeShort(item.getQuantity());
        mplew.writeMapleNameString(item.getSender()); //自动填充到13位
        mplew.writeLong(item.getExpire() == null ? DateUtil.getFileTimestamp(FINAL_TIME) : DateUtil.getFileTimestamp(item.getExpire().getTime()));
        mplew.writeLong(0);
        mplew.writeLong(0); //093新增
        mplew.writeShort(0);//093新增
        return mplew.getPacket();
    }

    //获取商城的道具信息（这个应该是更新商场道具栏里面的）
    public static MaplePacket getCSInventory(MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
        System.out.println("更新商场道具栏");
        mplew.write(0x4C); //093
        MapleCSInventory csinv = chr.getCSInventory();
        mplew.writeShort(csinv.getCSItems().size());//商场道具栏物品的个数
        for (MapleCSInventoryItem citem : csinv.getCSItems().values()) {
            mplew.writeInt(citem.getUniqueId());
            mplew.writeInt(0);
            mplew.writeInt(chr.getAccountID());
            mplew.writeInt(0);
            mplew.writeInt(citem.getItemId());//物品ID
            mplew.writeInt(citem.getSn());
            mplew.writeShort(citem.getQuantity());
            mplew.writeMapleNameString(citem.getSender()); //自动填充到13位
            mplew.writeLong(citem.getExpire() == null ? DateUtil.getFileTimestamp(FINAL_TIME) : DateUtil.getFileTimestamp(citem.getExpire().getTime()));
            mplew.writeLong(0);
            mplew.writeLong(0); //093新增
            mplew.writeShort(0); //093新增
        }
        /*
         * if (csinv.getCSItems().size() > 0)
         * mplew.writeInt(0);
         */
        mplew.writeInt(0); //093新增
        mplew.writeShort(chr.getStorage().getSlots());
        mplew.writeShort(chr.getClient().getMaxCharSlot());
        mplew.writeInt(0x100);//093修改
        return mplew.getPacket();
    }

    //获取礼物（这个应该是更新商场道具栏里面的）
    public static MaplePacket getCSGifts(MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CS_OPERATION.getValue());
        mplew.write(0x4E);//32
        System.out.println("获取礼物"+SendPacketOpcode.CS_OPERATION);
        Collection<MapleCSInventoryItem> inv = chr.getCSInventory().getCSGifts().values();
        mplew.writeShort(inv.size());
        for (MapleCSInventoryItem gift : inv) {
            mplew.writeInt(gift.getUniqueId());
            mplew.writeInt(0);
            mplew.writeInt(gift.getItemId());//ID
            mplew.writeMapleNameString(gift.getSender()); //自动填充到13位
            mplew.writeMapleNameString(gift.getMessage()); //自动填充到13位
        }
        return mplew.getPacket();
    }

    public static MaplePacket showCygnusIntro(int id) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.Animation_EFFECT.getValue());
        mplew.write(0x14);
        mplew.writeMapleAsciiString("Effect/Direction.img/cygnus/Scene" + id);
        return mplew.getPacket();
    }

    public static MaplePacket showCygnusIntro_3(int id) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.Animation_EFFECT.getValue());
        mplew.write(0x14);
        mplew.writeMapleAsciiString("Effect/Direction3.img/cygnus/Scene" + 0);
        return mplew.getPacket();
    }

    public static MaplePacket CygnusIntroLock(boolean enable) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CYGNUS_INTRO_LOCK.getValue());
        mplew.write(enable ? 1 : 0);
        return mplew.getPacket();
    }

    public static MaplePacket CygnusIntroDisableUI(boolean enable) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CYGNUS_INTRO_DISABLE_UI.getValue());
        mplew.write(enable ? 1 : 0);
        return mplew.getPacket();
    }

    public static MaplePacket sendCygnusMessage(int type) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CYGNUS_CHAR_CREATED.getValue());
        mplew.writeInt(type);
        return mplew.getPacket();
    }

    public static MaplePacket boatPacket(boolean type) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行

        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.BOAT_EFFECT.getValue());
        mplew.writeShort(type ? 1 : 2);

        return mplew.getPacket();
    }

    public static MaplePacket trembleEffect(int type, int delay) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.BOSS_ENV.getValue());
        mplew.write(1);
        mplew.write(type);
        mplew.writeInt(delay);

        return mplew.getPacket();
    }

    public static MaplePacket getEnergy(int level) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.ENERGY.getValue());
        mplew.writeMapleAsciiString("energy");
        mplew.writeMapleAsciiString(Integer.toString(level));

        return mplew.getPacket();
    }

    public static MaplePacket Mulung_DojoUp2() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(7);

        return mplew.getPacket();
    }

    //更新被金锤子砸的装备
    public static MaplePacket updateHammerItem(IItem item) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(0);
        mplew.write(2);
        mplew.write(3);
        mplew.write(item.getType());
        mplew.writeShort(item.getPosition());
        mplew.write(0);
        mplew.write(1);
        addItemInfo(mplew, item, false, false, true);
        return mplew.getPacket();
    }

    /**
     * 发送错误信息到客户端.
     *     @数据包的值大概如下:<br>
     *       0x01 (1) - 现在关闭了缩地门
     *       0x02 (2) - 不能去那里
     *       0x03 (3) - 对不起，正在准备冒险岛ONLINE商城
     *       0x04 (4) - 因为有地气阻挡，无法接近。
     *       0x05 (5) - 无法进行瞬间移动的地区。
     *       0x06 (6) - 因为有地气阻挡，无法接近。
     *       0x07 (7) - 你因不当行为，而遭游戏管理员禁止攻击，禁止获取经验值和金币，禁止交易，禁止丢弃道具，禁止开启个人商店与精灵商人，禁止组队，禁止使用拍卖系统，因此无法使用改功能。
     *     @返回数据包后通知。
     */
    public static MaplePacket sendBlockedMessage(int type) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.BLOCK_MSG.getValue());
        mplew.write(type);
        return mplew.getPacket();
    }

    public static MaplePacket loadFamily(MapleCharacter player) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        String[] title = {"直接移动到学院成员身边", "直接召唤学院成员", "我的爆率 1.5倍(15分钟)", "我的经验值 1.5倍(15分钟)", "学院成员的团结(30分钟)", "我的爆率 2倍(15分钟)", "我的经验值 2倍(15分钟)", "我的爆率 2倍(30分钟)", "我的经验值 2倍(30分钟)", "我的组队爆率 2倍(30分钟)", "我的组队经验值 2倍(30分钟)"};
        String[] description = {"[对象] 我\n[效果] 直接可以移动到指定的学院成员身边。", "[对象] 学院成员 1名\n[效果] 直接可以召唤指定的学院成员到现在的地图。", "[对象] 我\n[持续效果] 15分钟\n[效果] 打怪爆率增加到 #c1.5倍# \n※ 与爆率活动重叠时失效。", "[对象] 我\n[持续效果] 15分钟\n[效果] 打怪经验值增加到 #c1.5倍# \n※ 与经验值活动重叠时失效。", "[启动条件] 校谱最低层学院成员6名以上在线时\n[持续效果] 30分钟\n[效果] 爆率和经验值增加到 #c2倍# ※ 与爆率、经验值活动重叠时失效。", "[对象] 我\n[持续效果] 15分钟\n[效果] 打怪爆率增加到 #c2倍# \n※ 与爆率活动重叠时失效。", "[对象] 我\n[持续效果] 15分钟\n[效果] 打怪经验值增加到 #c2倍# \n※ 与经验值活动重叠时失效。", "[对象] 我\n[持续效果] 30分钟\n[效果] 打怪爆率增加到 #c2倍# \n※ 与爆率活动重叠时失效。", "[对象] 我\n[持续效果] 30分钟\n[效果] 打怪经验值增加到 #c2倍# \n※ 与经验值活动重叠时失效。", "[对象] 我所属组队\n[持续效果] 30分钟\n[效果] 打怪爆率增加到 #c2倍# \n※ 与爆率活动重叠时失效。", "[对象] 我所属组队\n[持续效果] 30分钟\n[效果] 打怪经验值增加到 #c2倍# \n※ 与经验值活动重叠时失效。"};
        int[] repCost = {3, 5, 7, 8, 10, 12, 15, 20, 25, 40, 50};
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.LOAD_FAMILY.getValue());
        mplew.writeInt(11);
        for (int i = 0; i < 11; i++) {
            mplew.write(i > 4 ? (i % 2) + 1 : i);
            mplew.writeInt(repCost[i] * 100);
            mplew.writeInt(1);
            mplew.writeMapleAsciiString(title[i]);
            mplew.writeMapleAsciiString(description[i]);
        }
        return mplew.getPacket();
    }

    public static MaplePacket sendFamilyMessage() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.FAMILY_MESSAGE.getValue());
        mplew.writeInt(0);
        return mplew.getPacket();
    }

    public static MaplePacket getFamilyInfo(MapleCharacter chr) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.OPEN_FAMILY.getValue()); // who cares what header is
        mplew.writeInt(chr.getFamily().getReputation()); // cur rep left
        mplew.writeInt(chr.getFamily().getTotalReputation()); // tot rep left
        mplew.writeInt(chr.getFamily().getTodaysRep()); // todays rep
        mplew.writeShort(chr.getFamily().getJuniors()); // juniors added
        mplew.writeShort(chr.getFamily().getTotalJuniors()); // juniors allowed
        mplew.writeShort(0);
        mplew.writeInt(chr.getFamilyId()); // id?
        mplew.writeMapleAsciiString(chr.getFamily().getFamilyName());
        mplew.writeInt(0);
        mplew.writeShort(0);
        return mplew.getPacket();
    }

    public static MaplePacket sendFamilyInvite(int playerId, String inviter) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.FAMILY_INVITE.getValue());
        mplew.writeInt(playerId);
        mplew.writeMapleAsciiString(inviter);
        return mplew.getPacket();
    }

    public static MaplePacket sendEngagementRequest(String name) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.FAMILY_ACTION.getValue()); //<name> has requested engagement. Will you accept this proposal?
        mplew.write(0);
        mplew.writeMapleAsciiString(name); // name
        mplew.writeInt(10); // playerid
        return mplew.getPacket();
    }

    public static MaplePacket sendGroomWishlist() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.FAMILY_ACTION.getValue()); //<name> has requested engagement. Will you accept this proposal?
        mplew.write(9);
        return mplew.getPacket();
    }

    public static MaplePacket sendFamilyJoinResponse(boolean accepted, String added) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.FAMILY_MESSAGE2.getValue());
        mplew.write(accepted ? 1 : 0);
        mplew.writeMapleAsciiString(added);
        return mplew.getPacket();
    }

    public static MaplePacket getSeniorMessage(String name) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.FAMILY_SENIOR_MESSAGE.getValue());
        mplew.writeMapleAsciiString(name);
        mplew.writeInt(0);
        return mplew.getPacket();
    }

    public static MaplePacket sendGainRep(int gain, int mode) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.FAMILY_GAIN_REP.getValue());
        mplew.writeInt(gain);
        mplew.writeShort(0);
        return mplew.getPacket();
    }

    //更新背包内道具
    public static MaplePacket updateItemInSlot(IItem item) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(0); // could be from drop
        mplew.write(2); // always 2
        mplew.write(3); // quantity > 0 (?)
        mplew.write(item.getType()); // inventory type
        mplew.write(item.getPosition()); // item slot
        mplew.writeShort(0);
        mplew.write(1);
        mplew.write(item.getPosition()); // wtf repeat
        addItemInfo(mplew, item, true, false, false);
        return mplew.getPacket();
    }

    //物品到期
    public static MaplePacket itemExpired(int itemid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(2);
        mplew.writeInt(itemid);
        return mplew.getPacket();
    }

    /**
19 itemlevelup
17 book pickup
10 过图声音
11 转职图案
12 好像是任务完成
     */
    public static MaplePacket showSpecialEffect(int effect) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(effect);
        return mplew.getPacket();
    }

    public static MaplePacket playPortalSound() {
        return showSpecialEffect(10);
    }

    public static MaplePacket showMonsterBookPickup() {
        return showSpecialEffect(17);
    }

    public static MaplePacket showEquipmentLevelUp() {
        return showSpecialEffect(19);
    }

    public static MaplePacket showItemLevelup() {
        return showSpecialEffect(19);
    }


    //金锤子
    public static MaplePacket sendHammerData(int hammerUsed) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.VICIOUS_HAMMER.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("34 00 00 00 00"));
        mplew.writeInt(hammerUsed);
        return mplew.getPacket();
    }

    public static MaplePacket sendHammerMessage() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.VICIOUS_HAMMER.getValue());
        mplew.write(HexTool.getByteArrayFromHexString("38 00 00 00 00"));
        return mplew.getPacket();
    }

    public static MaplePacket hammerItem(IItem item) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MODIFY_INVENTORY_ITEM.getValue());
        mplew.write(0); // could be from drop
        mplew.write(2); // always 2
        mplew.write(3); // quantity > 0 (?)
        mplew.write(1); // Inventory type
        //mplew.write(item.getPosition()); // item slot
        //mplew.writeShort(0);
        mplew.writeShort(item.getPosition());
        mplew.write(0);
        mplew.write(1);
        mplew.write(item.getPosition()); // wtf repeat
        //addItemInfo(mplew, item, true, false, false);
        addItemInfo(mplew, item, false, false, false);
        return mplew.getPacket();
    }

    public static MaplePacket sendDojoAnimation(byte firstByte, String animation) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.BOSS_ENV.getValue());
        mplew.write(firstByte);
        mplew.writeMapleAsciiString(animation);
        return mplew.getPacket();
    }

    public static MaplePacket getDojoInfo(String info) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(10);
        mplew.write(HexTool.getByteArrayFromHexString("B7 04"));
        mplew.writeMapleAsciiString(info);
        return mplew.getPacket();
    }

    public static MaplePacket getDojoInfoMessage(String message) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(9);
        mplew.writeMapleAsciiString(message);
        return mplew.getPacket();
    }

    //更新道场
    public static MaplePacket updateDojoStats(MapleCharacter chr, int belt) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(0x0A);
        mplew.write(HexTool.getByteArrayFromHexString("B7 04")); //?
        mplew.writeMapleAsciiString("pt=" + chr.getDojoPoints() + ";belt=" + belt + ";tuto=" + (chr.getFinishedDojoTutorial() ? "1" : "0"));
        return mplew.getPacket();
    }

    public static MaplePacket dojoWarpUp() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.DOJO_WARP_UP.getValue());
        mplew.write(0);
        mplew.write(6);
        return mplew.getPacket();
    }

    public static MaplePacket addCard(boolean full, int cardid, int level) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MONSTERBOOK_ADD.getValue());
        mplew.write(full ? 0 : 1);
        mplew.writeInt(cardid);
        mplew.writeInt(level);
        return mplew.getPacket();
    }

    public static MaplePacket showGainCard() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(0x0D);
        return mplew.getPacket();
    }

    public static MaplePacket showForeginCardEffect(int id) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_FOREIGN_EFFECT.getValue());
        mplew.writeInt(id);
        mplew.write(0x0D);
        return mplew.getPacket();
    }

    public static MaplePacket changeCover(int cardid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MONSTER_BOOK_CHANGE_COVER.getValue());
        mplew.writeInt(cardid);
        return mplew.getPacket();
    }

    public static MaplePacket getStatusMsg(int itemid) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(7);
        mplew.writeInt(itemid);
        return mplew.getPacket();
    }

    public static MaplePacket enableTV() {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        mplew.writeShort(SendPacketOpcode.ENABLE_TV.getValue());
        mplew.writeInt(0);
        mplew.write(0);
        return mplew.getPacket();
    }

    public static MaplePacket removeTV() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.REMOVE_TV.getValue());
        return mplew.getPacket();
    }

    public static MaplePacket sendTV(MapleCharacter chr, List<String> messages, int type, MapleCharacter partner) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SEND_TV.getValue());
        mplew.write(partner != null ? 2 : 0);
        mplew.write(type); //Heart = 2  Star = 1  Normal = 0
        addCharLook(mplew, chr, false);
        mplew.writeMapleAsciiString(chr.getName());
        if (partner != null) {
            mplew.writeMapleAsciiString(partner.getName());
        } else {
            mplew.writeShort(0);
        }
        for (int i = 0; i < messages.size(); i++) {
            if (i == 4 && messages.get(4).length() > 15) {
                mplew.writeMapleAsciiString(messages.get(4).substring(0, 15));
            } else {
                mplew.writeMapleAsciiString(messages.get(i));
            }
        }
        mplew.writeInt(1337);
        if (partner != null) {
            addCharLook(mplew, partner, false);
        }
        return mplew.getPacket();
    }

    public static MaplePacket updateIntroState(String mode, int quest) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        mplew.write(11); //mode
        mplew.writeShort(quest);
        mplew.writeMapleAsciiString(mode);
        return mplew.getPacket();
    }

    public static MaplePacket addTutorialStats() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(0);
        mplew.writeShort(SendPacketOpcode.ENABLE_TEMPORARY_STATS.getValue());
        mplew.writeInt(3871);
        mplew.writeShort(999);
        mplew.writeShort(999);
        mplew.writeShort(999);
        mplew.writeShort(999);
        mplew.writeShort(255);
        mplew.writeShort(999);
        mplew.writeShort(999);
        mplew.write(120);
        mplew.write(140);
        return mplew.getPacket();
    }

    public static MaplePacket removeTutorialStats() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.DISABLE_TEMPORARY_STATS.getValue());
        return mplew.getPacket();
    }

    public static MaplePacket lockUI(boolean mode) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.TUTORIAL_DISABLE_UI.getValue());
        mplew.write(mode ? 1 : 0);
        return mplew.getPacket();
    }

    public static MaplePacket disableUI(boolean mode) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.TUTORIAL_LOCK_UI.getValue());
        mplew.write(mode ? 1 : 0);
        return mplew.getPacket();
    }

    public static MaplePacket spawnTutorialSummon(int type) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.TUTORIAL_SUMMON.getValue());
        mplew.write(type);
        return mplew.getPacket();
    }

    public static MaplePacket displayGuide(int guide) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.TUTORIAL_GUIDE.getValue());
        mplew.write(1);
        mplew.writeInt(guide);
        mplew.writeInt(12000);
        return mplew.getPacket();
    }

    public static MaplePacket tutorialSpeechBubble(String message) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.TUTORIAL_GUIDE.getValue());
        mplew.write(0);
        mplew.writeMapleAsciiString(message);
        mplew.writeInt(200);
        mplew.writeInt(10000);
        return mplew.getPacket();
    }

    public static MaplePacket showInfo(String message) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_INFO.getValue());
        mplew.writeMapleAsciiString(message);
        return mplew.getPacket();
    }

    public static MaplePacket showMapEffect(String path) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MAP_EFFECT.getValue());
        mplew.write(3);
        mplew.writeMapleAsciiString(path);
        return mplew.getPacket();
    }

    public static MaplePacket showTipsEffect(String env) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(23);
        mplew.writeMapleAsciiString(env);
        mplew.writeInt(1);
        return mplew.getPacket();
    }

    public static MaplePacket showWZEffect(String path, int info) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        if (info == -1) {
            mplew.write(0x12);//12
        } else {
            mplew.write(0x17);//17
        }
        mplew.writeMapleAsciiString(path);
        if (info > -1) {
            mplew.writeInt(info);
        }
        return mplew.getPacket();
    }

    public static MaplePacket showWZEffectS(String path, int info) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(0x14);
        mplew.writeMapleAsciiString(path);
        if (info > -1) {
            mplew.writeInt(info);
        }
        return mplew.getPacket();
    }

    public static MaplePacket playWZSound(String path) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MAP_EFFECT.getValue());
        mplew.write(4); //mode
        mplew.writeMapleAsciiString(path);
        return mplew.getPacket();
    }

    public static MaplePacket blockedPortal() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.UPDATE_STATS.getValue());
        mplew.write(1);
        mplew.writeInt(0);
        return mplew.getPacket();
    }

    //海盗的能量获得
    public static MaplePacket givePirateBuff(int buffid, int bufflength, List<Pair<MapleBuffStat, Integer>> statups) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
        long mask = getLongMask(statups);
        mplew.writeInt(0);
        mplew.writeLong(mask);
        mplew.writeLong(0);
        mplew.writeShort(0);
        for (Pair<MapleBuffStat, Integer> statup : statups) {
            mplew.writeShort(statup.getRight().shortValue()); //最大只是1W 海盗的能量上限
            mplew.writeShort(0);
            mplew.write(0);
            mplew.writeInt(0);
            mplew.writeInt(buffid);
            mplew.writeInt(bufflength);
        }
        return mplew.getPacket();
    }


    public static MaplePacket showPirateBuff(int cid, int skillid, int time, List<Pair<MapleBuffStat, Integer>> statups) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
        mplew.writeInt(cid);
        long mask = getLongMask(statups);
        mplew.writeLong(mask);
        mplew.writeLong(0);
        mplew.writeShort(0);
        for (Pair<MapleBuffStat, Integer> statup : statups) {
            mplew.writeShort(statup.getRight());
            mplew.writeShort(0);
            mplew.writeInt(skillid);
            mplew.writeInt(0);
            mplew.write(0);
            mplew.writeShort(time);
        }
        mplew.writeShort(0);
        return mplew.getPacket();
    }

   public static MaplePacket shenlong(int i) {
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(i); //274/275 暗/亮   124/125 龙珠9个齐全,开始召唤神龙
        //mplew.write(HexTool.getByteArrayFromHexString("00 BC 06 00 00"));
        mplew.write(HexTool.getByteArrayFromHexString("DC 05 00 00 90 5F 01 00 DC 05 00 00 9B 00 00 00"));
        return mplew.getPacket();
    }

   public static MaplePacket shenlong2(int i) {
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(i); //274/275 暗/亮   124/125 龙珠9个齐全,开始召唤神龙
        mplew.write(HexTool.getByteArrayFromHexString("02 CB 06 00 00 FB 44 00 00"));
        return mplew.getPacket();
    }

    public static MaplePacket DragonBall1(int i ,boolean Zhaohuan) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        //打开谜之蛋 137
        //龙珠 141
        //95 00 00 00 00 00 01 00 00 01 01 00 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.DragonBall1.getValue());
        mplew.writeInt(0);
        mplew.write(1);
        if(!Zhaohuan){ //不能召唤
            mplew.writeShort(0);
            mplew.writeShort(i); //512的倍数都是满龙珠 不用Long的原因是512的倍数出现的龙珠是蓝色的 漂亮
            mplew.writeShort(0);
        } else { //可以召唤
            mplew.writeLong(512); //512的倍数都是满龙珠 不是则出不来
        }
        return mplew.getPacket();
    }


    public static MaplePacket getCY1(int npc, String talk, byte type){
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
        mplew.write(4);
        mplew.writeInt(npc);
        mplew.write(0x0E);//次元之镜
        mplew.write(0);
        mplew.writeInt(0);
        mplew.write(type);//由#type#开始 填1 打开Npc就先显示#1#的图案    填2 打开Npc就先显示#2#的图案
        mplew.writeShort(0);
        mplew.write(0);
        mplew.writeMapleAsciiString(talk);
        return mplew.getPacket();
    }

    public static MaplePacket getCY2(int npc, String talk, byte type){
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
        mplew.write(4);
        mplew.writeInt(npc);
        mplew.write(0x11);//龙舟赛
        mplew.write(0);
        mplew.writeInt(0);
        mplew.write(type);//由#type#开始 填1 打开Npc就先显示#1#的图案    填2 打开Npc就先显示#2#的图案
        mplew.writeShort(0);
        mplew.write(0);
        mplew.writeMapleAsciiString(talk);
        return mplew.getPacket();
    }


    public static MaplePacket toWeb() {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(0x8B);
        mplew.writeMapleAsciiString("http://www.psmxd.com/");
        return mplew.getPacket();
    }

    public static MaplePacket 潜能效果(boolean 是否潜能附加卷, int cid, ScrollResult scrollSuccess, boolean 是否使用匠人之魂) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //星
        //CC 00 [9F 2F 75 00] [00 01] [00] 失败
        //CC 00 [9F 2F 75 00] [01 00] [00] 成功
        //潜
        //CD 00 [9F 2F 75 00] [00 01] [00] 失败
        //CD 00 [9F 2F 75 00] [01 00] [00] 成功
        if(是否潜能附加卷)
            mplew.writeShort(SendPacketOpcode.POTENTIAL_SCROLL.getValue());
        else
            mplew.writeShort(SendPacketOpcode.STAR_SCROLL.getValue());
        mplew.writeInt(cid);
        switch (scrollSuccess) {
            case SUCCESS:
                mplew.writeShort(1);
                mplew.write(是否使用匠人之魂 ? 1 : 0);
                break;
            case CURSE:
                mplew.writeShort(0x100);
                mplew.write(是否使用匠人之魂 ? 1 : 0);
                break;
        }
        return mplew.getPacket();
    }

    public static MaplePacket showMagniflerEffect(int cid, short pos) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MAGNIFLER_SCROLL.getValue());
        mplew.writeInt(cid);
        mplew.writeShort(pos);
        return mplew.getPacket();
    }

    /*
    public static MaplePacket 验证码() {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.write(HexTool.getByteArrayFromHexString("17 00 01 95 08 00 00 FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF FE 00 3B 43 52 45 41 54 4F 52 3A 20 67 64 2D 6A 70 65 67 20 76 31 2E 30 20 28 75 73 69 6E 67 20 49 4A 47 20 4A 50 45 47 20 76 36 32 29 2C 20 71 75 61 6C 69 74 79 20 3D 20 39 30 0A FF DB 00 43 00 03 02 02 03 02 02 03 03 03 03 04 03 03 04 05 08 05 05 04 04 05 0A 07 07 06 08 0C 0A 0C 0C 0B 0A 0B 0B 0D 0E 12 10 0D 0E 11 0E 0B 0B 10 16 10 11 13 14 15 15 15 0C 0F 17 18 16 14 18 12 14 15 14 FF DB 00 43 01 03 04 04 05 04 05 09 05 05 09 14 0D 0B 0D 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 FF C0 00 11 08 00 3C 00 78 03 01 22 00 02 11 01 03 11 01 FF C4 00 1F 00 00 01 05 01 01 01 01 01 01 00 00 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0A 0B FF C4 00 B5 10 00 02 01 03 03 02 04 03 05 05 04 04 00 00 01 7D 01 02 03 00 04 11 05 12 21 31 41 06 13 51 61 07 22 71 14 32 81 91 A1 08 23 42 B1 C1 15 52 D1 F0 24 33 62 72 82 09 0A 16 17 18 19 1A 25 26 27 28 29 2A 34 35 36 37 38 39 3A 43 44 45 46 47 48 49 4A 53 54 55 56 57 58 59 5A 63 64 65 66 67 68 69 6A 73 74 75 76 77 78 79 7A 83 84 85 86 87 88 89 8A 92 93 94 95 96 97 98 99 9A A2 A3 A4 A5 A6 A7 A8 A9 AA B2 B3 B4 B5 B6 B7 B8 B9 BA C2 C3 C4 C5 C6 C7 C8 C9 CA D2 D3 D4 D5 D6 D7 D8 D9 DA E1 E2 E3 E4 E5 E6 E7 E8 E9 EA F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FF C4 00 1F 01 00 03 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0A 0B FF C4 00 B5 11 00 02 01 02 04 04 03 04 07 05 04 04 00 01 02 77 00 01 02 03 11 04 05 21 31 06 12 41 51 07 61 71 13 22 32 81 08 14 42 91 A1 B1 C1 09 23 33 52 F0 15 62 72 D1 0A 16 24 34 E1 25 F1 17 18 19 1A 26 27 28 29 2A 35 36 37 38 39 3A 43 44 45 46 47 48 49 4A 53 54 55 56 57 58 59 5A 63 64 65 66 67 68 69 6A 73 74 75 76 77 78 79 7A 82 83 84 85 86 87 88 89 8A 92 93 94 95 96 97 98 99 9A A2 A3 A4 A5 A6 A7 A8 A9 AA B2 B3 B4 B5 B6 B7 B8 B9 BA C2 C3 C4 C5 C6 C7 C8 C9 CA D2 D3 D4 D5 D6 D7 D8 D9 DA E2 E3 E4 E5 E6 E7 E8 E9 EA F2 F3 F4 F5 F6 F7 F8 F9 FA FF DA 00 0C 03 01 00 02 11 03 11 00 3F 00 FB 62 8A 28 AC 8E 20 A2 8A 28 00 A2 8A 28 00 A2 8A 28 00 A2 8A 28 00 A2 8A 28 00 A2 8A 28 00 A2 8A 28 00 A2 8A 28 00 A2 8A F1 1F 8B 9F B4 7D F7 83 9A 7B 3F 03 F8 0F 5A F8 8B A9 5A 4B 34 77 D2 59 43 2C 36 36 46 24 2C E1 AE 4C 6C AF 20 23 1E 5A 67 90 54 95 6C 2B 05 46 2E 4E C8 F4 2F 89 FF 00 14 BC 39 F0 7B C2 37 5E 23 F1 45 F8 B1 D3 A1 21 14 01 BA 49 E4 39 DB 1C 6B D5 98 E0 F1 E8 09 24 00 48 F2 4F 87 FA 9F C5 5F 8F 6D FF 00 09 72 78 86 5F 86 7E 03 BC 0A FA 4E 95 6D 61 6D 71 A9 DD 43 B4 7E FA 59 26 47 48 C3 9C B2 80 A7 82 3B 61 9B E2 0F 17 FC 61 D7 7F 6D BF 8E 1E 04 D0 75 6B 65 D1 74 77 BE 5B 38 EC 2C A5 2E 22 89 E5 DD 2C BB 98 73 27 94 00 CE 00 FD DE 40 19 22 BD BA EF E2 76 B1 F0 77 F6 D2 D0 FC 03 A7 78 D3 C4 3A B7 83 AD A5 81 35 0B 1D 72 ED 5A 18 0C 96 AC 7E 57 04 7E E6 34 91 24 C1 0A 01 42 08 21 41 35 63 B3 D8 B8 2B 7D AD CF 70 FD A8 FE 2D F8 C7 F6 69 F8 65 A5 6B FA 35 D4 3E 2B 2D 7C 2C 6E 9F 5E B5 52 FF 00 3C 72 32 48 5A DC C2 A0 2B 46 A3 01 39 DC 79 07 15 E2 9F 15 3C 77 F1 77 C5 3F B3 B6 97 F1 C3 49 F1 DC 9A 14 31 4B 6D 31 F0 EE 8D 1A F9 09 1A 4B E4 97 92 4E 4C 8C 66 E5 A3 60 53 69 DA C0 ED 39 EB FF 00 6A 8F 8F BF 0F FE 29 FE CF DE 2A D3 EC A4 D4 EE 74 D9 A6 16 D6 3E 20 1A 6C BF D9 EF 7D 13 09 56 25 97 19 CB 6C 2B BB 1B 7E 6E B8 E6 B8 8F D9 0B 58 B2 F1 BF EC 91 E3 DF 87 9A E5 CA 58 CA D1 DF 1D 3B ED 40 AF 99 13 C2 1F 7C 43 19 93 CB 94 16 6D 80 E3 72 E4 72 32 21 C2 3C B0 52 6B 5B FE 05 BF 02 78 AF E2 BF ED 67 F0 3F C4 1A D2 F8 F2 E7 C2 BA 86 87 6C F1 C7 A7 E8 76 DF 67 7D 52 68 D1 9D 26 79 54 86 55 90 EE 88 AA 7C BB A3 CE 38 DB 51 FE CB 7F B7 EA CD 65 E1 7F 03 78 E6 D2 FF 00 53 D6 EE 2F A1 D2 AD F5 B8 8A 15 31 3E D8 E2 7B 82 EE 0B 30 63 F3 3F 52 BF 31 CB 67 37 7F E0 9D BE 27 D5 FC 03 A5 F8 B3 C1 1E 2B D0 B5 AD 11 63 B8 5D 52 DE 6B DD 32 E1 22 8C B4 23 CC 59 18 A6 23 25 52 26 5D C4 6E DD C7 24 67 E2 3F 18 E9 7A AF C3 CF 89 06 F2 E3 40 D4 3C 37 8B CF ED 3D 3E CF 50 B7 92 07 F2 3C E2 62 65 DE AA 59 7E 5C 06 C0 CE D3 D3 04 07 6E 86 CA 9C 67 29 41 AD 3A 1F B8 74 57 C8 9F 1C BE 35 FC 6E F8 2F E0 8B 5F 88 71 BF 84 B5 7D 07 56 92 15 3A 3B 59 CD 27 F6 4A BA B3 44 56 64 95 0C DB 81 01 DC E0 06 0B B5 40 26 B5 3F 63 BF DA C3 5E FD A2 75 9D 7A CB C4 30 E8 DA 54 D6 16 A9 2D BD A6 9D 14 82 49 FE 60 24 94 B3 CA DB 55 49 40 14 AF 3B F8 63 B4 8A 8B 1C 1E C6 5C BC FD 0F A9 E8 AF 2A F8 29 6D A9 EA FA 8F 8A 7C 4D A9 EB 97 FA F5 A5 CD E9 B3 D0 EE AE 8C 6B 13 E9 C8 AA CB 2C 6B 12 24 4E 24 95 A5 61 28 5C BA 08 FE 62 00 AF 55 A0 C9 AB 3B 05 14 51 40 82 8A 28 A0 02 BC DB E3 6F C6 2B 5F 85 3E 1F 58 6C AD DB 59 F1 8E A6 1A 1D 0F C3 F6 8A 64 B8 BD 9F 07 07 60 E4 46 BF 79 DF A0 00 F3 92 05 56 FD A1 BC 5D F1 13 C2 1E 06 96 E7 E1 BF 85 63 F1 36 B2 D9 57 67 94 66 D5 78 F9 D6 1E 0C CD CF 0A 0F 18 C9 CF 4A F9 17 E1 86 BF FB 46 78 07 E2 44 C2 E7 E1 02 78 87 C5 9A A2 BC 77 DE 22 D5 63 91 9E 64 C9 70 82 F4 4B F6 78 62 50 A0 08 D3 6A 92 17 82 DB 69 A4 6F 4E 9F 32 E6 6D 7D E6 BF EC FD FB 1B 78 FF 00 E0 D7 C4 CF 0B F8 EB 55 D3 34 CF 12 5D BD 8D DC D7 16 2B 7C 20 3A 5D EB C5 27 96 19 B9 59 01 C8 42 C8 18 2B 48 C4 2B 04 57 3E 6F FB 58 7C 14 D7 FE 1C 68 9A CF C4 8F 1A EB 5A 75 CF 8D BC 5D AB FD 92 1D 3B 4B 91 BC AB 2B 56 8D DA 42 AC C1 59 F0 89 14 27 8C 05 73 92 C5 C5 7E 97 68 30 EA 16 FA 35 9A 6A D7 31 5D EA 7E 58 37 32 C1 1E C8 8C 87 96 08 BD 42 02 48 50 49 38 03 24 9C 93 CF FC 51 F8 4F E1 8F 8C 9E 16 9B 40 F1 56 99 1E A1 64 E7 7C 6F F7 66 B7 93 B4 91 3F 54 61 EA 3A 8C 83 90 48 A2 E6 91 C4 4B 9F 9A 47 93 7C 33 F8 29 F0 FF 00 E2 3F EC 99 E0 7F 0B DD 4E 75 4F 0B 8B 38 35 09 27 B7 B8 11 16 B8 F9 A4 98 B3 29 F9 71 23 CA 0A E7 2B 82 09 C8 AF 78 F0 FE 81 A7 78 5B 44 B1 D2 34 8B 38 AC 34 CB 28 56 0B 7B 68 06 12 34 51 80 07 F8 F7 AF 03 F8 67 FB 0F 78 47 E1 B5 DB 2A 78 93 C5 3A CE 8A 65 F3 BF B0 2F B5 00 BA 7C 8E 3A 34 D0 C6 AA B2 91 81 C3 70 71 C8 35 F4 65 26 63 51 A6 F4 77 41 5F 06 FF 00 C1 4B 3E 1D EA DE 22 F1 27 C3 DD 53 42 D2 AE F5 9B E9 20 BC B5 92 DA CA D5 AE 24 DB 19 8E 50 76 A8 24 8C 34 84 F1 80 05 7D E5 46 39 A1 68 2A 73 74 E5 CC 8F 8F 7E 39 7C 54 F0 4F C4 7F D9 50 F8 2F C1 F7 07 5B F1 0E A5 A6 D9 C5 63 E1 9D 22 39 6F 6F 6D 9A 19 21 66 49 50 6E 78 FC B0 87 26 52 09 DA 79 27 AF CE 8B FB 2C FC 52 FD 9F B5 0F 87 7E 20 D3 F5 0F B1 EA DE 25 B9 1A 35 D0 B2 1E 61 D3 64 B9 FD DA C7 21 3F 2B 65 1C 92 70 55 5D 0F 27 E5 27 F5 2D 22 48 D9 99 51 55 9C E5 88 18 27 EB 4E A7 7B 1A C6 BB 82 B4 56 85 5D 2B 4C B5 D1 34 BB 3D 3A C6 14 B6 B2 B4 85 2D E0 86 31 85 8E 34 50 AA A0 7A 00 00 AB 54 51 48 E6 0A 28 A2 80 0A 28 A2 80 0A 28 A2 80 0A 28 A2 80 0A 28 A2 80 0A 28 A2 80 0A 28 A2 80 0A 28 A2 80 0A 28 A2 80 3F FF D9"));
        return mplew.getPacket();
    }
    */

    public static MaplePacket giveMonsterbBomb(MapleMonster monster) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MonsterBombSkill.getValue());//0x10E
        mplew.writeInt(双刀.怪物炸弹);
        mplew.writeInt(monster.getPosition().x);
        mplew.writeInt(monster.getPosition().y);
        mplew.writeInt(0);
        mplew.writeInt(0);
        return mplew.getPacket();
    }

    public static MaplePacket 每日特卖(MapleCharacter chr, int time, int sn) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.EVERY_DAY_SALE.getValue());
        mplew.writeInt(time);
        mplew.writeInt(sn);
        return mplew.getPacket();
    }

    public static MaplePacket 机械技能特效(int type, int value, int chrlevel, int skillid, int skilllevel, int unknow) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        //EE 00 01 85 E3 17 02 7A 01 01 导弹战车
        //EE 00 03 04 00 00 00 DF FC 4D 00 01 骰子
        //09 01 03 05 00 00 00 65 C0 17 02 14 骰子
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(type);
        if(type == 3) // 3是骰子
            mplew.writeInt(value); //骰子点数
        mplew.writeInt(skillid);
        mplew.write(chrlevel);
        mplew.write(skilllevel);
        mplew.write(unknow); //不知道是什么 经常是01
        return mplew.getPacket();
    }

    //给别人看的
    public static MaplePacket 机械技能特效(int cid, int type, int value, int chrlevel, int skillid, int skilllevel, int unknow) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.writeInt(cid);
        mplew.write(type);
        if(type == 3) // 3是骰子
            mplew.writeInt(value); //骰子点数
        mplew.writeInt(skillid);
        mplew.write(chrlevel);
        mplew.write(skilllevel);
        mplew.write(unknow); //不知道是什么 经常是01
        return mplew.getPacket();
    }

    // C8 FE 45 02 65 C0 17 02 01 FB 00 60 FE E8 03 00
    public static MaplePacket 骰子(int skillid, List<Pair<MapleBuffStat, Integer>> statups, int skilllength, int type) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
        Mask093(mplew, statups);
        mplew.writeShort(type); //骰子的点数
        mplew.writeInt(skillid);//技能ID
        mplew.writeInt(skilllength);//持续时间
        mplew.writeShort(0);
        mplew.write(0); //093++
        mplew.writeInt(type == 3 ? 20 : 0); //3 - 最大Hp 20%
        mplew.writeInt(type == 3 ? 20 : 0); //3 - 最大Mp 20%
        mplew.writeInt(type == 4 ? 15 : 0); //4 - 暴击 15%
        mplew.write(new byte[20]);
        mplew.writeInt(type == 2 ? 30 : 0); //2 - 物理防御力
        mplew.write(new byte[12]);
        mplew.writeInt(type == 5 ? 20 : 0); //5 - 伤害 20%
        mplew.write(new byte[16]);
        mplew.writeInt(type == 6 ? 30 : 0); //6 - 经验 30%
        mplew.write(new byte[16]);
        mplew.writeShort(240);
        return mplew.getPacket();
    }

   public static MaplePacket 传送门的效果(int cid, Point pos, boolean first) { //这里是假的 一个显示出来效果而已
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SPAWN_DOOR2.getValue());
        mplew.write(0);
        mplew.writeInt(cid);
        mplew.writeShort(pos.x);
        mplew.writeShort(pos.y);
        mplew.write(first ? 1 : 0);
        mplew.writeInt(0);
        return mplew.getPacket();
    }

   public static MaplePacket 传送门的传送点(Point pos) { //召唤一个传送点
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SPAWN_PORTAL2.getValue());
        mplew.writeShort(pos.x);
        mplew.writeShort(pos.y);
        return mplew.getPacket();
    }

   public static MaplePacket 取消传送门(int cid, boolean first) { //取消传送门的
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.REMOVE_DOOR2.getValue());
        mplew.write(0);
        mplew.writeInt(cid);
        mplew.write(first ? 1 : 0);
        return mplew.getPacket();
    }

   public static MaplePacket 召唤磁场(int cid, int oid1, int oid2, int oid3) { //召唤磁场
       if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SPAWN_MAGNETIC_FIELD.getValue());
        mplew.writeInt(cid);
        mplew.writeInt(oid1);
        mplew.writeInt(oid2);
        mplew.writeInt(oid3);
        return mplew.getPacket();
    }

    public static MaplePacket 魔方光效(int id) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.MAGIC_SCROLL.getValue());
        mplew.writeInt(id);
        mplew.write(1);
        return mplew.getPacket();
    }

    public static MaplePacket 结婚效果() {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(0x4F);
        return mplew.getPacket();
    }

    public static MaplePacket 怪物炸弹效果(MapleCharacter chr, int x, int y, int skillid, int skilllevel) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(7); //effect type
        mplew.writeInt(skillid);
        mplew.writeInt(x);
        mplew.writeInt(y);
        mplew.writeInt(skilllevel);
        mplew.writeInt(chr.getLevel());
        return mplew.getPacket();
    }

    /*
     * Type
     * 1 - PVP提示1[屏幕正中间黄字]
     * 2 - PVP提示2[屏幕正中间绿字]
     * 3 - PVP提示3[对话框内多种颜色的字]
     */
    public static MaplePacket 文字公告(int type, int type2, String text) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        switch(type) {
            case 1: //黄字
                mplew.writeShort(SendPacketOpcode.Maple_Tip1.getValue());
                break;
            case 2: //绿字
                mplew.writeShort(SendPacketOpcode.Maple_Tip2.getValue());
                mplew.write(0);
                break;
            case 3: //多颜色字
                //5 绿字 悄悄话
                //7 黄字
                mplew.writeShort(SendPacketOpcode.Maple_Tip3.getValue());
                mplew.writeShort(type2);
                break;
        }
        mplew.writeMapleAsciiString(text);
        if(type == 2)
            mplew.write(0);
        return mplew.getPacket();
    }

    public static MaplePacket serverNotice(String text) {
        return 文字公告(3, 7, text);
    }

    public static MaplePacket 创建终极冒险家() {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.Ultimate.getValue());
        return mplew.getPacket();
    }

    public static MaplePacket openBeans(int beansCount ,int type) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.BEANS_GAME1.getValue());
        mplew.writeInt(beansCount);
        mplew.write(type);
        return mplew.getPacket();
    }

    public static MaplePacket updateBeans(int cid ,int beansCount) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.UPDATE_BEANS.getValue());
        mplew.writeInt(cid);
        mplew.writeInt(beansCount);
        mplew.writeInt(0);
        return mplew.getPacket();
    }

    public static MaplePacket showBeans(List<Beans> beansInfo) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.BEANS_GAME2.getValue());
        mplew.write(0);
        mplew.write(beansInfo.size());
        for(Beans bean : beansInfo) {
            mplew.writeShort(bean.getPos());
            mplew.write(bean.getType());
            mplew.writeInt(bean.getNumber());
            //System.out.println("发包时豆豆序号"+bean.getNumber());
        }
        //System.out.println("豆豆发包"+mplew.getPacket());
        //mplew.write(HexTool.getByteArrayFromHexString("DA 01 00 05 BD 0F 01 60 00 00 00 FF 0E 01 61 00 00 00 69 0E 01 62 00 00 00 05 0F 01 63 00 00 00 C6 0F 01 64 00 00 00"));
        return mplew.getPacket();
    }

    public static MaplePacket getNPCTalkText(int npc, String talk,int Least,int max) {
        if(show)System.out.println("调用的函数："+new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
        mplew.write(4); // ?
        mplew.writeInt(npc);
        mplew.writeShort(3);
        mplew.writeMapleAsciiString(talk);
        mplew.writeShort(0);
        mplew.writeShort(Least);//最少
        mplew.writeShort(max);
        return mplew.getPacket();
    }

    //锻造时显示在人物身上的光效[例如头上的进度条]
    public static MaplePacket 副职业效果_wz(String wzfrom, int time, int type) {
        if (show) {
            System.out.println("调用的函数：" + new Throwable().getStackTrace()[0]); //显示调用的类 函数名 函数所在行
        }
        //0A 01
        //22
        //29 00
        //45 66 66 65 63 74 2F 42 61 73 69 63 45 66 66 2E 69 6D 67 2F 70 72 6F 66 65 73 73 69 6F 6E 73 2F 68 65 72 62 61 6C 69 73 6D
        //10 0E 00 00
        //01 00 00 00
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
        mplew.write(0x22); //type
        mplew.writeMapleAsciiString(wzfrom); //wz地址
        mplew.writeInt(time);
        mplew.writeInt(type);
        return mplew.getPacket();
    }
    
}